From a4ebf162cfd33784767e3df7473f24b7d20e1379 Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Thu, 11 Jan 2024 17:48:50 +0800 Subject: [PATCH] Converter issue fix (#4851) 1. fix discriminator finding logic: previous exit logic for recursion is wrong 2. refine TSP build-in model filtering logic: add all special models and also add build-in namespace to models.tsp to resolve some compiling error 3. fix number enum naming issue 4. change to always use custom patch 5. replace response model for normal operation to fix missing model ref compiling error 6. fix enum default value compiling error 7. ~remove `@path` for resource key~ 8. resolve operation id collision problem 9. fix multi-layer singleton resource with duplicate key issue 10. fix singleton resource base parameter calculation issue 11. refine operaion id logic and add example conversion 12. add basic global check name availability operation 13. fix enum doc missing issue 14. add lro header support --- .prettierignore | 3 +- .../fix_converter_2024-01-08-09-46.json | 10 + common/config/rush/pnpm-lock.yaml | 38 +- .../openapi-to-typespec/convert.ps1 | 6 +- .../openapi-to-typespec/package.json | 3 +- .../src/emiters/emit-arm-resources.ts | 17 +- .../src/generate/generate-arm-resource.ts | 126 +- .../src/generate/generate-enums.ts | 4 +- .../src/generate/generate-operations.ts | 4 +- .../src/generate/generate-parameter.ts | 4 +- .../generate/generate-service-information.ts | 32 +- .../openapi-to-typespec/src/interfaces.ts | 12 +- .../openapi-to-typespec/src/model.ts | 6 +- .../src/transforms/transform-arm-resources.ts | 218 +- .../src/transforms/transform-choices.ts | 2 +- .../src/transforms/transform-object.ts | 4 +- .../src/transforms/transform-operations.ts | 3 +- .../transform-service-information.ts | 16 +- .../src/utils/decorators.ts | 3 +- .../src/utils/discriminator.ts | 14 +- .../openapi-to-typespec/src/utils/imports.ts | 10 +- .../src/utils/model-generation.ts | 4 +- .../src/utils/resource-discovery.ts | 44 +- .../openapi-to-typespec/src/utils/values.ts | 26 + .../test/analyzeText/tsp-output/main.tsp | 1 + .../test/analyzeText/tsp-output/models.tsp | 2 + .../anomalyDetector/tsp-output/models.tsp | 38 +- .../arm-agrifood/tsp-output/DataConnector.tsp | 5 + .../tsp-output/DataManagerForAgriculture.tsp | 27 +- .../DataManagerForAgricultureExtension.tsp | 3 + .../DataManagerForAgricultureSolution.tsp | 9 +- .../arm-agrifood/tsp-output/Extension.tsp | 5 + .../tsp-output/PrivateEndpointConnection.tsp | 11 +- .../tsp-output/PrivateLinkResource.tsp | 3 + .../test/arm-agrifood/tsp-output/Solution.tsp | 5 + .../DataConnectors_CreateOrUpdate.json | 69 + .../DataConnectors_Delete.json | 21 + .../DataConnectors_Get.json | 40 + .../DataConnectors_List.json | 69 + ...taManagerForAgricultureExtensions_Get.json | 245 + ...aManagerForAgricultureExtensions_List.json | 250 + ...orAgricultureResources_CreateOrUpdate.json | 67 + ...ManagerForAgricultureResources_Delete.json | 14 + ...ataManagerForAgricultureResources_Get.json | 36 + ...icultureResources_ListByResourceGroup.json | 40 + ...ricultureResources_ListBySubscription.json | 39 + ...ManagerForAgricultureResources_Update.json | 69 + .../Extensions_CreateOrUpdate.json | 48 + .../2023-06-01-preview/Extensions_Delete.json | 15 + .../2023-06-01-preview/Extensions_Get.json | 40 + ...sions_ListByDataManagerForAgriculture.json | 39 + ...ateEndpointConnections_CreateOrUpdate.json | 59 + .../PrivateEndpointConnections_Delete.json | 20 + .../PrivateEndpointConnections_Get.json | 39 + ...ateEndpointConnections_ListByResource.json | 50 + .../PrivateLinkResources_Get.json | 37 + .../PrivateLinkResources_ListByResource.json | 32 + .../SolutionsDiscoverability_Get.json | 776 ++ .../SolutionsDiscoverability_List.json | 778 ++ .../Solutions_CreateOrUpdate.json | 80 + .../2023-06-01-preview/Solutions_Delete.json | 15 + .../2023-06-01-preview/Solutions_Get.json | 41 + .../2023-06-01-preview/Solutions_List.json | 44 + .../test/arm-agrifood/tsp-output/main.tsp | 1 + .../test/arm-agrifood/tsp-output/models.tsp | 53 + .../test/arm-agrifood/tsp-output/routes.tsp | 2 + .../arm-alertsmanagement/alertsmanagement.md | 133 + .../test/arm-alertsmanagement/resources.json | 253 + .../arm-alertsmanagement/tsp-output/Alert.tsp | 136 + .../tsp-output/AlertProcessingRule.tsp | 42 + .../tsp-output/SmartGroup.tsp | 112 + ...ActionGroupToAllAlertsInASubscription.json | 95 + ...lSev0AndSev1AlertsInTwoResourceGroups.json | 131 + ...000AtASpecificDatePacificStandardTime.json | 101 + ...scriptionComingFromASpecificAlertRule.json | 113 + ...0_0400EverySatAndSunIndiaStandardTime.json | 158 + ...MonFri_09_00_17_00EasternStandardTime.json | 137 + .../AlertProcessingRules_Delete.json | 14 + .../AlertProcessingRules_GetByName.json | 98 + ...rtProcessingRules_ListByResourceGroup.json | 137 + ...ertProcessingRules_ListBySubscription.json | 128 + .../AlertProcessingRules_Update.json | 94 + .../2021-08-08/Alerts_ChangeState.json | 49 + .../examples/2021-08-08/Alerts_GetAll.json | 81 + .../examples/2021-08-08/Alerts_GetById.json | 45 + .../2021-08-08/Alerts_GetHistory.json | 41 + .../2021-08-08/SmartGroups_ChangeState.json | 76 + .../2021-08-08/SmartGroups_GetAll.json | 147 + .../2021-08-08/SmartGroups_GetById.json | 72 + .../2021-08-08/SmartGroups_GetHistory.json | 32 + .../arm-alertsmanagement/tsp-output/main.tsp | 37 + .../tsp-output/models.tsp | 708 ++ .../tsp-output/tspconfig.yaml | 11 + .../arm-analysisservices/analysisservices.md | 100 + .../test/arm-analysisservices/resources.json | 172 + .../tsp-output/AnalysisServicesServer.tsp | 128 + .../Servers_CheckNameAvailability.json | 21 + .../examples/2017-08-01/Servers_Create.json | 112 + .../examples/2017-08-01/Servers_Delete.json | 23 + .../2017-08-01/Servers_DissociateGateway.json | 15 + .../2017-08-01/Servers_GetDetails.json | 38 + .../examples/2017-08-01/Servers_List.json | 63 + .../Servers_ListByResourceGroup.json | 64 + .../2017-08-01/Servers_ListGatewayStatus.json | 18 + .../Servers_ListSkusForExisting.json | 61 + .../2017-08-01/Servers_ListSkusForNew.json | 41 + .../examples/2017-08-01/Servers_Resume.json | 20 + .../examples/2017-08-01/Servers_Suspend.json | 20 + .../examples/2017-08-01/Servers_Update.json | 84 + .../arm-analysisservices/tsp-output/main.tsp | 28 + .../tsp-output/models.tsp | 338 + .../tsp-output/tspconfig.yaml | 11 + .../tsp-output/AccessInformationContract.tsp | 39 +- .../tsp-output/ApiContract.tsp | 48 +- .../ApiManagementServiceResource.tsp | 263 +- .../tsp-output/ApiReleaseContract.tsp | 25 +- .../tsp-output/ApiVersionSetContract.tsp | 25 +- .../AuthorizationServerContract.tsp | 28 +- .../tsp-output/BackendContract.tsp | 28 +- .../tsp-output/CacheContract.tsp | 25 +- .../tsp-output/CertificateContract.tsp | 21 +- .../tsp-output/DeletedServiceContract.tsp | 18 +- .../tsp-output/DiagnosticContract.tsp | 25 +- .../tsp-output/EmailTemplateContract.tsp | 25 +- .../GatewayCertificateAuthorityContract.tsp | 18 +- .../tsp-output/GatewayContract.tsp | 40 +- .../GatewayHostnameConfigurationContract.tsp | 18 +- .../tsp-output/GlobalSchemaContract.tsp | 21 +- .../tsp-output/GroupContract.tsp | 31 +- .../tsp-output/IdentityProviderContract.tsp | 28 +- .../tsp-output/IssueAttachmentContract.tsp | 18 +- .../tsp-output/IssueCommentContract.tsp | 18 +- .../tsp-output/IssueContract.tsp | 25 +- .../tsp-output/LoggerContract.tsp | 25 +- .../tsp-output/NamedValueContract.tsp | 41 +- .../tsp-output/NotificationContract.tsp | 24 +- .../OpenidConnectProviderContract.tsp | 25 +- .../tsp-output/OperationContract.tsp | 25 +- .../tsp-output/PolicyContract.tsp | 20 +- .../tsp-output/PortalDelegationSettings.tsp | 36 +- .../tsp-output/PortalRevisionContract.tsp | 31 +- .../tsp-output/PortalSigninSettings.tsp | 27 +- .../tsp-output/PortalSignupSettings.tsp | 27 +- .../tsp-output/PrivateEndpointConnection.tsp | 15 +- .../tsp-output/PrivateLinkResource.tsp | 9 +- .../tsp-output/ProductContract.tsp | 45 +- .../tsp-output/SchemaContract.tsp | 21 +- .../tsp-output/SubscriptionContract.tsp | 34 +- .../tsp-output/TagContract.tsp | 18 +- .../tsp-output/TagDescriptionContract.tsp | 18 +- .../tsp-output/TenantSettingsContract.tsp | 9 +- .../tsp-output/UserContract.tsp | 50 +- .../ApiDiagnostic_CreateOrUpdate.json | 162 + .../2021-08-01/ApiDiagnostic_Delete.json | 17 + .../2021-08-01/ApiDiagnostic_Get.json | 59 + .../ApiDiagnostic_GetEntityTag.json | 19 + .../ApiDiagnostic_ListByService.json | 63 + .../2021-08-01/ApiDiagnostic_Update.json | 106 + .../ApiIssueAttachment_CreateOrUpdate.json | 46 + .../2021-08-01/ApiIssueAttachment_Delete.json | 18 + .../2021-08-01/ApiIssueAttachment_Get.json | 27 + .../ApiIssueAttachment_GetEntityTag.json | 20 + .../ApiIssueAttachment_ListByService.json | 32 + .../ApiIssueComment_CreateOrUpdate.json | 46 + .../2021-08-01/ApiIssueComment_Delete.json | 18 + .../2021-08-01/ApiIssueComment_Get.json | 27 + .../ApiIssueComment_GetEntityTag.json | 20 + .../ApiIssueComment_ListByService.json | 32 + .../2021-08-01/ApiIssue_CreateOrUpdate.json | 51 + .../examples/2021-08-01/ApiIssue_Delete.json | 17 + .../examples/2021-08-01/ApiIssue_Get.json | 29 + .../2021-08-01/ApiIssue_GetEntityTag.json | 19 + .../2021-08-01/ApiIssue_ListByService.json | 34 + .../examples/2021-08-01/ApiIssue_Update.json | 35 + ...Skus_ApiManagementListSkUsConsumption.json | 26 + ...ceSkus_ApiManagementListSkUsDedicated.json | 79 + ...vice_ApplyNetworkConfigurationUpdates.json | 55 + ...ckup_ApiManagementBackupWithAccessKey.json | 129 + ...gementBackupWithSystemManagedIdentity.json | 99 + ...BackupWithUserAssignedManagedIdentity.json | 100 + ...nagementService_CheckNameAvailability.json | 21 + ...eMultiRegionServiceWithCustomHostname.json | 258 + ...teOrUpdate_ApiManagementCreateService.json | 143 + ...e_ApiManagementCreateServiceHavingMsi.json | 139 + ...gementCreateServiceInVnetWithPublicIp.json | 171 + ...ate_ApiManagementCreateServiceInZones.json | 158 + ...eateServiceWithCustomHostnameKeyVault.json | 284 + ...ntCreateServiceWithSystemCertificates.json | 175 + ...CreateServiceWithUserAssignedIdentity.json | 158 + ..._CreateOrUpdate_ApiManagementUndelete.json | 115 + .../ApiManagementService_Delete.json | 62 + .../ApiManagementService_GetSsoToken.json | 17 + ...mentServiceGetMultiRegionInternalVnet.json | 102 + ...ce_Get_ApiManagementServiceGetService.json | 168 + ...iManagementServiceGetServiceHavingMsi.json | 91 + .../2021-08-01/ApiManagementService_List.json | 357 + ...ManagementService_ListByResourceGroup.json | 358 + .../ApiManagementService_Restore.json | 129 + ...piManagementUpdateServiceDisableTls10.json | 94 + ...nagementUpdateServicePublisherDetails.json | 93 + ...eServiceToNewVnetAndAvailabilityZones.json | 163 + .../ApiOperationPolicy_CreateOrUpdate.json | 42 + .../2021-08-01/ApiOperationPolicy_Delete.json | 18 + .../2021-08-01/ApiOperationPolicy_Get.json | 25 + .../ApiOperationPolicy_GetEntityTag.json | 20 + .../ApiOperationPolicy_ListByOperation.json | 30 + .../ApiOperation_CreateOrUpdate.json | 132 + .../2021-08-01/ApiOperation_Delete.json | 17 + .../2021-08-01/ApiOperation_GetEntityTag.json | 19 + ...tion_Get_ApiManagementGetApiOperation.json | 53 + ..._ApiManagementGetApiOperationPetStore.json | 93 + .../2021-08-01/ApiOperation_ListByApi.json | 72 + .../2021-08-01/ApiOperation_Update.json | 90 + .../2021-08-01/ApiProduct_ListByApis.json | 34 + .../2021-08-01/ApiRelease_CreateOrUpdate.json | 46 + .../2021-08-01/ApiRelease_Delete.json | 17 + .../examples/2021-08-01/ApiRelease_Get.json | 27 + .../2021-08-01/ApiRelease_GetEntityTag.json | 19 + .../2021-08-01/ApiRelease_ListByService.json | 31 + .../2021-08-01/ApiRelease_Update.json | 34 + .../2021-08-01/ApiRevision_ListByService.json | 29 + .../2021-08-01/ApiSchema_CreateOrUpdate.json | 53 + .../examples/2021-08-01/ApiSchema_Delete.json | 17 + .../examples/2021-08-01/ApiSchema_Get.json | 27 + .../2021-08-01/ApiSchema_GetEntityTag.json | 19 + .../2021-08-01/ApiSchema_ListByApi.json | 29 + .../ApiTagDescription_CreateOrUpdate.json | 49 + .../2021-08-01/ApiTagDescription_Delete.json | 17 + .../2021-08-01/ApiTagDescription_Get.json | 28 + .../ApiTagDescription_GetEntityTag.json | 19 + .../ApiTagDescription_ListByService.json | 32 + .../ApiVersionSet_CreateOrUpdate.json | 44 + .../2021-08-01/ApiVersionSet_Delete.json | 16 + .../2021-08-01/ApiVersionSet_Get.json | 25 + .../ApiVersionSet_GetEntityTag.json | 18 + .../ApiVersionSet_ListByService.json | 40 + .../2021-08-01/ApiVersionSet_Update.json | 33 + ...CreateOrUpdate_ApiManagementCreateApi.json | 100 + ...eOrUpdate_ApiManagementCreateApiClone.json | 81 + ...ntCreateApiNewVersionUsingExistingApi.json | 97 + ...ementCreateApiRevisionFromExistingApi.json | 70 + ...reateApiUsingImportOverrideServiceUrl.json | 70 + ...ApiManagementCreateApiUsingOai3Import.json | 67 + ...ManagementCreateApiUsingSwaggerImport.json | 69 + ...ApiManagementCreateApiUsingWadlImport.json | 69 + ...iManagementCreateApiWithOpenIdConnect.json | 101 + ...rUpdate_ApiManagementCreateGraphQlApi.json | 77 + ...eateSoapPassThroughApiUsingWsdlImport.json | 74 + ...entCreateSoapToRestApiUsingWsdlImport.json | 71 + ...pdate_ApiManagementCreateWebSocketApi.json | 77 + .../examples/2021-08-01/Api_Delete.json | 16 + .../examples/2021-08-01/Api_GetEntityTag.json | 18 + .../Api_Get_ApiManagementGetApiContract.json | 36 + ...t_ApiManagementGetApiRevisionContract.json | 34 + .../2021-08-01/Api_ListByService.json | 84 + .../examples/2021-08-01/Api_ListByTags.json | 33 + .../examples/2021-08-01/Api_Update.json | 43 + .../AuthorizationServer_CreateOrUpdate.json | 96 + .../AuthorizationServer_Delete.json | 16 + .../2021-08-01/AuthorizationServer_Get.json | 45 + .../AuthorizationServer_GetEntityTag.json | 18 + .../AuthorizationServer_ListByService.json | 76 + .../AuthorizationServer_ListSecrets.json | 20 + .../AuthorizationServer_Update.json | 52 + ...piManagementCreateBackendProxyBackend.json | 128 + ...iManagementCreateBackendServiceFabric.json | 89 + .../examples/2021-08-01/Backend_Delete.json | 16 + .../examples/2021-08-01/Backend_Get.json | 40 + .../2021-08-01/Backend_GetEntityTag.json | 18 + .../2021-08-01/Backend_ListByService.json | 83 + .../2021-08-01/Backend_Reconnect.json | 19 + .../examples/2021-08-01/Backend_Update.json | 63 + .../2021-08-01/Cache_CreateOrUpdate.json | 47 + .../examples/2021-08-01/Cache_Delete.json | 16 + .../examples/2021-08-01/Cache_Get.json | 26 + .../2021-08-01/Cache_GetEntityTag.json | 18 + .../2021-08-01/Cache_ListByService.json | 30 + .../examples/2021-08-01/Cache_Update.json | 32 + ...Update_ApiManagementCreateCertificate.json | 43 + ...nagementCreateCertificateWithKeyVault.json | 61 + .../2021-08-01/Certificate_Delete.json | 16 + .../2021-08-01/Certificate_GetEntityTag.json | 18 + ...icate_Get_ApiManagementGetCertificate.json | 25 + ...iManagementGetCertificateWithKeyVault.json | 33 + .../2021-08-01/Certificate_ListByService.json | 48 + .../2021-08-01/Certificate_RefreshSecret.json | 33 + .../examples/2021-08-01/ContentItem_Get.json | 30 + .../2021-08-01/ContentItem_ListByService.json | 33 + .../examples/2021-08-01/ContentType_Get.json | 70 + .../2021-08-01/ContentType_ListByService.json | 73 + .../DelegationSettings_CreateOrUpdate.json | 42 + .../2021-08-01/DelegationSettings_Get.json | 28 + .../DelegationSettings_GetEntityTag.json | 17 + .../DelegationSettings_ListSecrets.json | 17 + .../2021-08-01/DelegationSettings_Update.json | 27 + .../2021-08-01/DeletedServices_GetByName.json | 25 + .../DeletedServices_ListBySubscription.json | 38 + .../2021-08-01/DeletedServices_Purge.json | 30 + .../EmailTemplate_CreateOrUpdate.json | 98 + .../2021-08-01/EmailTemplate_Delete.json | 16 + .../2021-08-01/EmailTemplate_Get.json | 53 + .../EmailTemplate_GetEntityTag.json | 18 + .../EmailTemplate_ListByService.json | 58 + .../2021-08-01/EmailTemplate_Update.json | 60 + .../2021-08-01/GatewayApi_ListByService.json | 37 + ...ayCertificateAuthority_CreateOrUpdate.json | 39 + .../GatewayCertificateAuthority_Delete.json | 17 + .../GatewayCertificateAuthority_Get.json | 24 + ...ewayCertificateAuthority_GetEntityTag.json | 19 + ...wayCertificateAuthority_ListByService.json | 36 + ...yHostnameConfiguration_CreateOrUpdate.json | 54 + .../GatewayHostnameConfiguration_Delete.json | 17 + .../GatewayHostnameConfiguration_Get.json | 26 + ...wayHostnameConfiguration_GetEntityTag.json | 19 + ...ayHostnameConfiguration_ListByService.json | 40 + .../2021-08-01/Gateway_CreateOrUpdate.json | 47 + .../examples/2021-08-01/Gateway_Delete.json | 16 + .../2021-08-01/Gateway_GenerateToken.json | 22 + .../examples/2021-08-01/Gateway_Get.json | 26 + .../2021-08-01/Gateway_GetEntityTag.json | 18 + .../2021-08-01/Gateway_ListByService.json | 42 + .../examples/2021-08-01/Gateway_ListKeys.json | 19 + .../2021-08-01/Gateway_RegenerateKey.json | 17 + .../examples/2021-08-01/Gateway_Update.json | 35 + ...teOrUpdate_ApiManagementCreateSchema1.json | 49 + ...teOrUpdate_ApiManagementCreateSchema2.json | 109 + .../2021-08-01/GlobalSchema_Delete.json | 16 + .../2021-08-01/GlobalSchema_GetEntityTag.json | 18 + ...balSchema_Get_ApiManagementGetSchema1.json | 25 + ...balSchema_Get_ApiManagementGetSchema2.json | 45 + .../GlobalSchema_ListByService.json | 60 + .../examples/2021-08-01/GroupUser_List.json | 40 + ...eateOrUpdate_ApiManagementCreateGroup.json | 40 + ...date_ApiManagementCreateGroupExternal.json | 47 + .../examples/2021-08-01/Group_Delete.json | 16 + .../examples/2021-08-01/Group_Get.json | 27 + .../2021-08-01/Group_GetEntityTag.json | 18 + .../2021-08-01/Group_ListByService.json | 65 + .../examples/2021-08-01/Group_Update.json | 33 + .../IdentityProvider_CreateOrUpdate.json | 41 + .../2021-08-01/IdentityProvider_Delete.json | 16 + .../2021-08-01/IdentityProvider_Get.json | 32 + .../IdentityProvider_GetEntityTag.json | 18 + .../IdentityProvider_ListByService.json | 55 + .../IdentityProvider_ListSecrets.json | 18 + .../2021-08-01/IdentityProvider_Update.json | 39 + ...eOrUpdate_ApiManagementCreateAiLogger.json | 53 + ...eOrUpdate_ApiManagementCreateEhLogger.json | 53 + .../examples/2021-08-01/Logger_Delete.json | 16 + .../examples/2021-08-01/Logger_Get.json | 30 + .../2021-08-01/Logger_GetEntityTag.json | 18 + .../2021-08-01/Logger_ListByService.json | 54 + .../examples/2021-08-01/Logger_Update.json | 35 + ...rUpdate_ApiManagementCreateNamedValue.json | 61 + ...anagementCreateNamedValueWithKeyVault.json | 78 + .../2021-08-01/NamedValue_Delete.json | 16 + .../2021-08-01/NamedValue_GetEntityTag.json | 18 + ...dValue_Get_ApiManagementGetNamedValue.json | 29 + ...piManagementGetNamedValueWithKeyVault.json | 36 + .../2021-08-01/NamedValue_ListByService.json | 51 + .../2021-08-01/NamedValue_ListValue.json | 18 + .../2021-08-01/NamedValue_RefreshSecret.json | 41 + .../2021-08-01/NamedValue_Update.json | 45 + .../NetworkStatus_ListByLocation.json | 148 + .../NetworkStatus_ListByService.json | 152 + ...tionRecipientEmail_ListByNotification.json | 45 + ...ationRecipientUser_ListByNotification.json | 29 + .../Notification_CreateOrUpdate.json | 34 + .../examples/2021-08-01/Notification_Get.json | 34 + .../Notification_ListByService.json | 129 + .../OpenIdConnectProvider_CreateOrUpdate.json | 45 + .../OpenIdConnectProvider_Delete.json | 16 + .../2021-08-01/OpenIdConnectProvider_Get.json | 26 + .../OpenIdConnectProvider_ListByService.json | 31 + .../OpenIdConnectProvider_ListSecrets.json | 18 + .../OpenIdConnectProvider_Update.json | 32 + .../2021-08-01/Operation_ListByTags.json | 35 + ...rkDependenciesEndpoints_ListByService.json | 465 + ...ivityCheckAsync_HttpConnectivityCheck.json | 71 + ...tivityCheckAsync_TcpConnectivityCheck.json | 56 + .../PolicyDescription_ListByService.json | 38 + .../PortalRevision_CreateOrUpdate.json | 39 + .../2021-08-01/PortalRevision_Get.json | 28 + .../PortalRevision_GetEntityTag.json | 18 + .../PortalRevision_ListByService.json | 44 + .../2021-08-01/PortalRevision_Update.json | 40 + .../PortalSettings_ListByService.json | 54 + ...vateEndpointConnection_CreateOrUpdate.json | 44 + .../PrivateEndpointConnection_Delete.json | 20 + .../PrivateEndpointConnection_GetByName.json | 31 + ...ointConnection_GetPrivateLinkResource.json | 29 + ...ivateEndpointConnection_ListByService.json | 50 + ...ntConnection_ListPrivateLinkResources.json | 32 + .../2021-08-01/ProductApi_ListByProduct.json | 37 + .../ProductGroup_ListByProduct.json | 54 + .../2021-08-01/ProductSubscriptions_List.json | 32 + .../2021-08-01/Product_CreateOrUpdate.json | 44 + .../examples/2021-08-01/Product_Delete.json | 17 + .../examples/2021-08-01/Product_Get.json | 28 + .../2021-08-01/Product_GetEntityTag.json | 18 + .../2021-08-01/Product_ListByService.json | 58 + .../2021-08-01/Product_ListByTags.json | 35 + .../examples/2021-08-01/Product_Update.json | 34 + .../QuotaByCounterKeys_ListByService.json | 30 + .../2021-08-01/QuotaByPeriodKeys_Get.json | 26 + .../2021-08-01/Region_ListByService.json | 25 + .../2021-08-01/Reports_ListByApi.json | 57 + .../2021-08-01/Reports_ListByGeo.json | 39 + .../2021-08-01/Reports_ListByOperation.json | 78 + .../2021-08-01/Reports_ListByProduct.json | 57 + .../2021-08-01/Reports_ListByRequest.json | 58 + .../Reports_ListBySubscription.json | 81 + .../2021-08-01/Reports_ListByTime.json | 58 + .../2021-08-01/Reports_ListByUser.json | 75 + .../SignInSettings_CreateOrUpdate.json | 29 + .../2021-08-01/SignInSettings_Get.json | 22 + .../SignInSettings_GetEntityTag.json | 17 + .../2021-08-01/SignInSettings_Update.json | 20 + .../SignUpSettings_CreateOrUpdate.json | 39 + .../2021-08-01/SignUpSettings_Get.json | 27 + .../SignUpSettings_GetEntityTag.json | 17 + .../2021-08-01/SignUpSettings_Update.json | 25 + .../Subscription_CreateOrUpdate.json | 48 + .../2021-08-01/Subscription_Delete.json | 16 + .../examples/2021-08-01/Subscription_Get.json | 27 + .../2021-08-01/Subscription_GetEntityTag.json | 18 + .../2021-08-01/Subscription_List.json | 58 + .../2021-08-01/Subscription_ListSecrets.json | 19 + .../Subscription_RegeneratePrimaryKey.json | 14 + .../Subscription_RegenerateSecondaryKey.json | 14 + .../2021-08-01/Subscription_Update.json | 33 + .../2021-08-01/TagResource_ListByService.json | 63 + .../2021-08-01/Tag_AssignToOperation.json | 35 + .../2021-08-01/Tag_DetachFromOperation.json | 18 + .../2021-08-01/Tag_GetByOperation.json | 25 + .../Tag_GetEntityStateByOperation.json | 20 + .../2021-08-01/Tag_ListByOperation.json | 30 + .../TenantAccessGit_RegeneratePrimaryKey.json | 14 + ...enantAccessGit_RegenerateSecondaryKey.json | 14 + .../2021-08-01/TenantAccess_Create.json | 29 + .../2021-08-01/TenantAccess_GetEntityTag.json | 14 + ...cess_Get_ApiManagementGetTenantAccess.json | 23 + ...s_Get_ApiManagementGetTenantGitAccess.json | 24 + .../TenantAccess_ListByService.json | 28 + .../2021-08-01/TenantAccess_ListSecrets.json | 21 + .../TenantAccess_RegeneratePrimaryKey.json | 14 + .../TenantAccess_RegenerateSecondaryKey.json | 14 + .../2021-08-01/TenantAccess_Update.json | 29 + .../TenantConfiguration_Deploy.json | 39 + .../TenantConfiguration_GetSyncState.json | 30 + .../2021-08-01/TenantConfiguration_Save.json | 37 + .../TenantConfiguration_Validate.json | 37 + .../2021-08-01/TenantSettings_Get.json | 30 + .../TenantSettings_ListByService.json | 34 + .../UserConfirmationPassword_Send.json | 14 + .../examples/2021-08-01/UserGroup_List.json | 32 + .../2021-08-01/UserIdentities_List.json | 24 + .../2021-08-01/User_CreateOrUpdate.json | 63 + .../examples/2021-08-01/User_Delete.json | 16 + .../2021-08-01/User_GenerateSsoUrl.json | 18 + .../examples/2021-08-01/User_Get.json | 33 + .../2021-08-01/User_GetEntityTag.json | 18 + .../2021-08-01/User_GetSharedAccessToken.json | 24 + .../2021-08-01/User_ListByService.json | 74 + .../examples/2021-08-01/User_Update.json | 41 + .../arm-apimanagement/tsp-output/main.tsp | 4 +- .../arm-apimanagement/tsp-output/models.tsp | 527 +- .../arm-apimanagement/tsp-output/routes.tsp | 26 +- .../test/arm-authorization/authorization.md | 358 + .../test/arm-authorization/resources.json | 802 ++ .../tsp-output/DenyAssignment.tsp | 66 + .../tsp-output/ProviderOperationsMetadata.tsp | 60 + .../tsp-output/RoleAssignment.tsp | 71 + .../tsp-output/RoleAssignmentSchedule.tsp | 40 + .../RoleAssignmentScheduleInstance.tsp | 40 + .../RoleAssignmentScheduleRequest.tsp | 53 + .../tsp-output/RoleDefinition.tsp | 45 + .../tsp-output/RoleEligibilitySchedule.tsp | 40 + .../RoleEligibilityScheduleInstance.tsp | 40 + .../RoleEligibilityScheduleRequest.tsp | 53 + .../tsp-output/RoleManagementPolicy.tsp | 34 + .../RoleManagementPolicyAssignment.tsp | 34 + .../2015-07-01/DenyAssignments_Get.json | 47 + .../DenyAssignments_ListForResource.json | 57 + .../ProviderOperationsMetadata_Get.json | 26 + .../ProviderOperationsMetadata_List.json | 29 + .../RoleAssignmentScheduleInstances_Get.json | 54 + ...ignmentScheduleInstances_ListForScope.json | 58 + ...RoleAssignmentScheduleRequests_Cancel.json | 12 + ...RoleAssignmentScheduleRequests_Create.json | 82 + .../RoleAssignmentScheduleRequests_Get.json | 64 + ...signmentScheduleRequests_ListForScope.json | 68 + ...leAssignmentScheduleRequests_Validate.json | 82 + .../RoleAssignmentSchedules_Get.json | 53 + .../RoleAssignmentSchedules_ListForScope.json | 57 + ...reate_CreateRoleAssignmentForResource.json | 44 + ..._CreateRoleAssignmentForResourceGroup.json | 44 + ...e_CreateRoleAssignmentForSubscription.json | 44 + .../2015-07-01/RoleAssignments_Delete.json | 25 + .../2015-07-01/RoleAssignments_Get.json | 24 + .../RoleAssignments_ListForScope.json | 27 + .../RoleDefinitions_CreateOrUpdate.json | 63 + .../2015-07-01/RoleDefinitions_Delete.json | 39 + .../2015-07-01/RoleDefinitions_Get.json | 38 + .../2015-07-01/RoleDefinitions_List.json | 41 + .../RoleEligibilityScheduleInstances_Get.json | 50 + ...ibilityScheduleInstances_ListForScope.json | 54 + ...oleEligibilityScheduleRequests_Cancel.json | 12 + ...oleEligibilityScheduleRequests_Create.json | 81 + .../RoleEligibilityScheduleRequests_Get.json | 64 + ...gibilityScheduleRequests_ListForScope.json | 68 + ...eEligibilityScheduleRequests_Validate.json | 81 + .../RoleEligibilitySchedules_Get.json | 51 + ...RoleEligibilitySchedules_ListForScope.json | 55 + .../RoleManagementPolicies_Get.json | 734 ++ .../RoleManagementPolicies_ListForScope.json | 737 ++ ...date_PatchPartialRoleManagementPolicy.json | 777 ++ ...cies_Update_PatchRoleManagementPolicy.json | 1086 ++ ...oleManagementPolicyAssignments_Create.json | 395 + .../RoleManagementPolicyAssignments_Get.json | 393 + ...agementPolicyAssignments_ListForScope.json | 396 + .../arm-authorization/tsp-output/main.tsp | 52 + .../arm-authorization/tsp-output/models.tsp | 1270 +++ .../arm-authorization/tsp-output/routes.tsp | 108 + .../tsp-output/tspconfig.yaml | 11 + .../tsp-output/Application.tsp | 13 +- .../tsp-output/BusinessProcess.tsp | 8 +- .../tsp-output/BusinessProcessVersion.tsp | 3 + .../tsp-output/InfrastructureResource.tsp | 10 +- .../tsp-output/Space.tsp | 9 +- .../Applications_CreateOrUpdate.json | 94 + .../Applications_Delete.json | 15 + ...eteBusinessProcessDevelopmentArtifact.json | 17 + .../2023-11-14-preview/Applications_Get.json | 36 + ...GetBusinessProcessDevelopmentArtifact.json | 175 + ...stBusinessProcessDevelopmentArtifacts.json | 176 + .../Applications_ListBySpace.json | 39 + .../Applications_Patch.json | 44 + ...aveBusinessProcessDevelopmentArtifact.json | 326 + ...ateBusinessProcessDevelopmentArtifact.json | 176 + .../BusinessProcessVersions_Get.json | 109 + ...ProcessVersions_ListByBusinessProcess.json | 112 + .../BusinessProcesses_CreateOrUpdate.json | 289 + .../BusinessProcesses_Delete.json | 16 + .../BusinessProcesses_Get.json | 108 + .../BusinessProcesses_ListByApplication.json | 111 + .../BusinessProcesses_Patch.json | 113 + ...nfrastructureResources_CreateOrUpdate.json | 43 + .../InfrastructureResources_Delete.json | 15 + .../InfrastructureResources_Get.json | 25 + .../InfrastructureResources_ListBySpace.json | 28 + .../InfrastructureResources_Patch.json | 31 + .../Spaces_CreateOrUpdate.json | 51 + .../2023-11-14-preview/Spaces_Delete.json | 14 + .../2023-11-14-preview/Spaces_Get.json | 27 + .../Spaces_ListByResourceGroup.json | 30 + .../Spaces_ListBySubscription.json | 30 + .../2023-11-14-preview/Spaces_Patch.json | 35 + .../tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 99 + .../tsp-output/routes.tsp | 2 + .../tsp-output/AvailabilitySet.tsp | 11 +- .../tsp-output/CapacityReservation.tsp | 11 +- .../tsp-output/CapacityReservationGroup.tsp | 11 +- .../arm-compute/tsp-output/CloudService.tsp | 26 +- .../tsp-output/CloudServiceRole.tsp | 3 + .../tsp-output/CommunityGallery.tsp | 2 + .../tsp-output/CommunityGalleryImage.tsp | 3 + .../CommunityGalleryImageVersion.tsp | 3 + .../arm-compute/tsp-output/DedicatedHost.tsp | 11 +- .../tsp-output/DedicatedHostGroup.tsp | 12 +- .../test/arm-compute/tsp-output/Disk.tsp | 27 +- .../arm-compute/tsp-output/DiskAccess.tsp | 11 +- .../tsp-output/DiskEncryptionSet.tsp | 11 +- .../tsp-output/DiskRestorePoint.tsp | 21 +- .../test/arm-compute/tsp-output/Gallery.tsp | 14 +- .../tsp-output/GalleryApplication.tsp | 11 +- .../tsp-output/GalleryApplicationVersion.tsp | 10 +- .../arm-compute/tsp-output/GalleryImage.tsp | 8 +- .../tsp-output/GalleryImageVersion.tsp | 11 +- .../test/arm-compute/tsp-output/Image.tsp | 9 +- .../test/arm-compute/tsp-output/OSFamily.tsp | 9 +- .../test/arm-compute/tsp-output/OSVersion.tsp | 9 +- .../tsp-output/PrivateEndpointConnection.tsp | 15 +- .../tsp-output/ProximityPlacementGroup.tsp | 8 +- .../arm-compute/tsp-output/RestorePoint.tsp | 4 + .../tsp-output/RestorePointCollection.tsp | 11 +- .../arm-compute/tsp-output/RoleInstance.tsp | 28 +- .../tsp-output/RollingUpgradeStatusInfo.tsp | 8 +- .../arm-compute/tsp-output/SharedGallery.tsp | 3 + .../tsp-output/SharedGalleryImage.tsp | 3 + .../tsp-output/SharedGalleryImageVersion.tsp | 3 + .../test/arm-compute/tsp-output/Snapshot.tsp | 27 +- .../tsp-output/SshPublicKeyResource.tsp | 28 +- .../arm-compute/tsp-output/VirtualMachine.tsp | 45 +- .../tsp-output/VirtualMachineExtension.tsp | 10 +- .../VirtualMachineExtensionImage.tsp | 3 + .../tsp-output/VirtualMachineRunCommand.tsp | 11 +- .../tsp-output/VirtualMachineScaleSet.tsp | 126 +- .../VirtualMachineScaleSetExtension.tsp | 10 +- .../tsp-output/VirtualMachineScaleSetVM.tsp | 55 +- .../VirtualMachineScaleSetVMExtension.tsp | 20 +- .../AvailabilitySets_CreateOrUpdate.json | 34 + ...te_AvailabilitySetDeleteMaximumSetGen.json | 14 + ...te_AvailabilitySetDeleteMinimumSetGen.json | 14 + ...s_Get_AvailabilitySetGetMaximumSetGen.json | 50 + ...s_Get_AvailabilitySetGetMinimumSetGen.json | 18 + ...itySetListAvailableSizesMaximumSetGen.json | 34 + ...itySetListAvailableSizesMinimumSetGen.json | 15 + .../AvailabilitySets_ListBySubscription.json | 87 + ...List_AvailabilitySetListMaximumSetGen.json | 146 + ...List_AvailabilitySetListMinimumSetGen.json | 33 + ...te_AvailabilitySetUpdateMaximumSetGen.json | 72 + ...te_AvailabilitySetUpdateMinimumSetGen.json | 18 + ...acityReservationGroups_CreateOrUpdate.json | 51 + ...tyReservationGroupDeleteMaximumSetGen.json | 14 + ...tyReservationGroupDeleteMinimumSetGen.json | 14 + .../CapacityReservationGroups_Get.json | 83 + ...ReservationGroups_ListByResourceGroup.json | 63 + ...yReservationGroups_ListBySubscription.json | 62 + ...tyReservationGroupUpdateMaximumSetGen.json | 68 + ...tyReservationGroupUpdateMinimumSetGen.json | 18 + .../CapacityReservations_CreateOrUpdate.json | 72 + ...apacityReservationDeleteMaximumSetGen.json | 20 + ...apacityReservationDeleteMinimumSetGen.json | 20 + .../2023-07-01/CapacityReservations_Get.json | 69 + ...ations_ListByCapacityReservationGroup.json | 79 + ...apacityReservationUpdateMaximumSetGen.json | 88 + ...apacityReservationUpdateMinimumSetGen.json | 25 + ...udServiceOperatingSystems_GetOSFamily.json | 32 + ...dServiceOperatingSystems_GetOSVersion.json | 28 + ...erviceOperatingSystems_ListOSFamilies.json | 53 + ...erviceOperatingSystems_ListOSVersions.json | 45 + .../CloudServiceRoleInstances_Delete.json | 20 + .../CloudServiceRoleInstances_Get.json | 34 + ...dServiceRoleInstances_GetInstanceView.json | 28 + ...iceRoleInstances_GetRemoteDesktopFile.json | 16 + .../CloudServiceRoleInstances_List.json | 94 + .../CloudServiceRoleInstances_Rebuild.json | 19 + .../CloudServiceRoleInstances_Reimage.json | 19 + .../CloudServiceRoleInstances_Restart.json | 19 + .../2023-07-01/CloudServiceRoles_Get.json | 29 + .../2023-07-01/CloudServiceRoles_List.json | 46 + ...dServicesUpdateDomain_GetUpdateDomain.json | 19 + ...ervicesUpdateDomain_ListUpdateDomains.json | 26 + ...reateNewCloudServiceWithMultipleRoles.json | 184 + ...tipleRolesInASpecificAvailabilityZone.json | 193 + ...e_CreateNewCloudServiceWithSingleRole.json | 160 + ...hSingleRoleAndCertificateFromKeyVault.json | 196 + ...dServiceWithSingleRoleAndRdpExtension.json | 211 + .../2023-07-01/CloudServices_Delete.json | 19 + .../CloudServices_DeleteInstances.json | 24 + .../2023-07-01/CloudServices_Get.json | 90 + .../CloudServices_GetInstanceView.json | 60 + .../2023-07-01/CloudServices_List.json | 89 + .../2023-07-01/CloudServices_ListAll.json | 88 + .../2023-07-01/CloudServices_PowerOff.json | 18 + .../2023-07-01/CloudServices_Rebuild.json | 24 + .../2023-07-01/CloudServices_Reimage.json | 24 + .../2023-07-01/CloudServices_Restart.json | 24 + .../2023-07-01/CloudServices_Start.json | 18 + .../2023-07-01/CloudServices_Update.json | 76 + .../2023-07-01/CommunityGalleries_Get.json | 22 + .../CommunityGalleryImageVersions_Get.json | 35 + .../CommunityGalleryImageVersions_List.json | 38 + .../CommunityGalleryImages_Get.json | 35 + .../CommunityGalleryImages_List.json | 36 + ...ate_CreateOrUpdateADedicatedHostGroup.json | 60 + ...DedicatedHostGroupWithUltraSsdSupport.json | 69 + ...DedicatedHostGroupDeleteMaximumSetGen.json | 14 + ...DedicatedHostGroupDeleteMinimumSetGen.json | 14 + ...tGroups_Get_CreateADedicatedHostGroup.json | 90 + ...teAnUltraSsdEnabledDedicatedHostGroup.json | 66 + ...GroupListByResourceGroupMaximumSetGen.json | 62 + ...GroupListByResourceGroupMinimumSetGen.json | 21 + ...tGroupListBySubscriptionMaximumSetGen.json | 61 + ...tGroupListBySubscriptionMinimumSetGen.json | 20 + ...DedicatedHostGroupUpdateMaximumSetGen.json | 93 + ...DedicatedHostGroupUpdateMinimumSetGen.json | 18 + .../DedicatedHosts_CreateOrUpdate.json | 62 + ...lete_DedicatedHostDeleteMaximumSetGen.json | 20 + ...lete_DedicatedHostDeleteMinimumSetGen.json | 20 + .../2023-07-01/DedicatedHosts_Get.json | 63 + .../DedicatedHosts_ListAvailableSizes.json | 21 + ...catedHostListByHostGroupMaximumSetGen.json | 64 + ...catedHostListByHostGroupMinimumSetGen.json | 23 + .../2023-07-01/DedicatedHosts_Restart.json | 16 + ...date_DedicatedHostUpdateMaximumSetGen.json | 89 + ...date_DedicatedHostUpdateMinimumSetGen.json | 20 + ...osts_Update_DedicatedHostUpdateResize.json | 45 + .../DiskAccesses_CreateOrUpdate.json | 35 + .../2023-07-01/DiskAccesses_Delete.json | 19 + ...sses_DeleteAPrivateEndpointConnection.json | 20 + ...ccesses_GetAPrivateEndpointConnection.json | 31 + .../DiskAccesses_GetPrivateLinkResources.json | 32 + ...etInformationAboutADiskAccessResource.json | 28 + ...iskAccessResourceWithPrivateEndpoints.json | 46 + .../2023-07-01/DiskAccesses_List.json | 63 + .../DiskAccesses_ListByResourceGroup.json | 64 + ...cesses_ListPrivateEndpointConnections.json | 34 + .../2023-07-01/DiskAccesses_Update.json | 45 + ...sses_UpdateAPrivateEndpointConnection.json | 57 + ...eateOrUpdate_CreateADiskEncryptionSet.json | 67 + ...ithKeyVaultFromADifferentSubscription.json | 58 + ...onSetWithKeyVaultFromADifferentTenant.json | 70 + .../2023-07-01/DiskEncryptionSets_Delete.json | 19 + ...GetInformationAboutADiskEncryptionSet.json | 38 + ...ncryptionSetWhenAutoKeyRotationFailed.json | 43 + .../2023-07-01/DiskEncryptionSets_List.json | 65 + ...ncryptionSets_ListAssociatedResources.json | 21 + ...iskEncryptionSets_ListByResourceGroup.json | 66 + ...nSets_Update_UpdateADiskEncryptionSet.json | 77 + ...stKeyVersionEnabledSetToTrueSucceeded.json | 65 + ...estKeyVersionEnabledSetToTrueUpdating.json | 70 + ...AnIncrementalDiskRestorePointResource.json | 30 + ...nSourceResourceIsFromADifferentRegion.json | 33 + .../DiskRestorePoint_GrantAccess.json | 29 + .../DiskRestorePoint_ListByRestorePoint.json | 33 + .../DiskRestorePoint_RevokeAccess.json | 20 + ...edDiskEncryptedWithCustomerManagedKey.json | 70 + ...iskAndAssociateWithDiskAccessResource.json | 54 + ...DiskAndAssociateWithDiskEncryptionSet.json | 55 + ..._CreateAManagedDiskByCopyingASnapshot.json | 49 + ...managedBlobFromADifferentSubscription.json | 52 + ...nUnmanagedBlobFromTheSameSubscription.json | 49 + ..._CreateAManagedDiskFromAPlatformImage.json | 76 + ...omAnAzureComputeGalleryCommunityImage.json | 66 + ...nAzureComputeGalleryDirectSharedImage.json | 66 + ...gedDiskFromAnAzureComputeGalleryImage.json | 66 + ...dDiskInTheSameOrDifferentSubscription.json | 49 + ...nagedDiskFromElasticSanVolumeSnapshot.json | 49 + ...nagedDiskFromImportSecureCreateOption.json | 67 + ...kFromUploadPreparedSecureCreateOption.json | 61 + ...ateAManagedDiskWithDataAccessAuthMode.json | 51 + ...gedDiskWithOptimizedForFrequentAttach.json | 52 + ...CreateAManagedDiskWithPerformancePlus.json | 49 + ...eAManagedDiskWithPremiumV2AccountType.json | 62 + ...CreateAManagedDiskWithSecurityProfile.json | 67 + ...eateAManagedDiskWithSsdZrsAccountType.json | 60 + ...traAccountTypeWithReadOnlyPropertySet.json | 69 + ...eateOrUpdate_CreateAManagedUploadDisk.json | 49 + ...eateOrUpdate_CreateAnEmptyManagedDisk.json | 49 + ...eAnEmptyManagedDiskInExtendedLocation.json | 61 + ...ManagedDiskWithLogicalSectorSize_512E.json | 63 + .../examples/2023-07-01/Disks_Delete.json | 19 + .../examples/2023-07-01/Disks_Get.json | 76 + ...sks_GrantAccess_GetASasOnAManagedDisk.json | 27 + ...ss_GetSasOnManagedDiskAndVmGuestState.json | 28 + .../examples/2023-07-01/Disks_List.json | 121 + .../2023-07-01/Disks_ListByResourceGroup.json | 122 + .../2023-07-01/Disks_RevokeAccess.json | 18 + ...teOrUpdateABurstingEnabledManagedDisk.json | 50 + ...ManagedDiskToAddAcceleratedNetworking.json | 72 + ...e_UpdateAManagedDiskToAddArchitecture.json | 72 + ...e_UpdateAManagedDiskToAddPurchasePlan.json | 81 + ...eAManagedDiskToAddSupportsHibernation.json | 62 + ...Update_UpdateAManagedDiskToChangeTier.json | 49 + ...e_UpdateAManagedDiskToDisableBursting.json | 44 + ...skToDisableOptimizedForFrequentAttach.json | 48 + ...teAManagedDiskWithDiskControllerTypes.json | 72 + ...ToRemoveDiskAccessResourceAssociation.json | 48 + ...reateOrUpdate_CreateACommunityGallery.json | 93 + ...OrUpdate_CreateOrUpdateASimpleGallery.json | 57 + ...pdateASimpleGalleryWithSharingProfile.json | 69 + ...ASimpleGalleryWithSoftDeletionEnabled.json | 69 + .../examples/2023-07-01/Galleries_Delete.json | 15 + .../Galleries_Get_GetACommunityGallery.json | 47 + .../2023-07-01/Galleries_Get_GetAGallery.json | 25 + ...GalleryWithExpandSharingProfileGroups.json | 39 + ..._Get_GetAGalleryWithSelectPermissions.json | 39 + .../examples/2023-07-01/Galleries_List.json | 29 + .../Galleries_ListByResourceGroup.json | 30 + .../examples/2023-07-01/Galleries_Update.json | 30 + ...eryApplicationVersions_CreateOrUpdate.json | 233 + .../GalleryApplicationVersions_Delete.json | 17 + ...ons_Get_GetAGalleryApplicationVersion.json | 67 + ...plicationVersionWithReplicationStatus.json | 85 + ...tionVersions_ListByGalleryApplication.json | 71 + .../GalleryApplicationVersions_Update.json | 78 + .../GalleryApplications_CreateOrUpdate.json | 132 + .../GalleryApplications_Delete.json | 16 + .../2023-07-01/GalleryApplications_Get.json | 42 + .../GalleryApplications_ListByGallery.json | 46 + .../GalleryApplications_Update.json | 69 + ...ionUsingCommunityGalleryImageAsSource.json | 324 + ...ImageVersionUsingManagedImageAsSource.json | 324 + ...nUsingMixOfDisksAndSnapshotsAsASource.json | 313 + ...ageVersionUsingShallowReplicationMode.json | 184 + ...yImageVersionUsingSharedImageAsSource.json | 324 + ...ryImageVersionUsingSnapshotsAsASource.json | 313 + ...eGalleryImageVersionUsingVhdAsASource.json | 271 + ...pleGalleryImageVersionUsingVmAsSource.json | 324 + ...nWithTargetExtendedLocationsSpecified.json | 366 + .../GalleryImageVersions_Delete.json | 17 + ...eVersions_Get_GetAGalleryImageVersion.json | 83 + ...leryImageVersionWithReplicationStatus.json | 101 + ...eryImageVersionWithSnapshotsAsASource.json | 82 + ...tAGalleryImageVersionWithVhdAsASource.json | 82 + ...lleryImageVersions_ListByGalleryImage.json | 87 + ...lleryImageVersionManagedImageAsSource.json | 91 + ...pleGalleryImageVersionWithoutSourceId.json | 87 + .../GalleryImages_CreateOrUpdate.json | 77 + .../2023-07-01/GalleryImages_Delete.json | 16 + .../2023-07-01/GalleryImages_Get.json | 30 + .../GalleryImages_ListByGallery.json | 34 + .../2023-07-01/GalleryImages_Update.json | 42 + ...haringIdToTheSharingProfileOfAGallery.json | 73 + ..._Update_ResetSharingProfileOfAGallery.json | 28 + ...ofile_Update_ShareAGalleryToCommunity.json | 28 + ...e_CreateAVirtualMachineImageFromABlob.json | 67 + ...romABlobWithDiskEncryptionSetResource.json | 73 + ...eAVirtualMachineImageFromAManagedDisk.json | 73 + ...agedDiskWithDiskEncryptionSetResource.json | 79 + ...eateAVirtualMachineImageFromASnapshot.json | 73 + ...SnapshotWithDiskEncryptionSetResource.json | 79 + ...hineImageFromAnExistingVirtualMachine.json | 72 + ...neImageThatIncludesADataDiskFromABlob.json | 83 + ...ThatIncludesADataDiskFromAManagedDisk.json | 95 + ...ageThatIncludesADataDiskFromASnapshot.json | 95 + ...mages_Delete_ImageDeleteMaximumSetGen.json | 19 + ...mages_Delete_ImageDeleteMinimumSetGen.json | 19 + .../examples/2023-07-01/Images_Get.json | 52 + .../examples/2023-07-01/Images_List.json | 53 + .../Images_ListByResourceGroup.json | 54 + .../examples/2023-07-01/Images_Update.json | 109 + ...oximityPlacementGroups_CreateOrUpdate.json | 67 + .../ProximityPlacementGroups_Delete.json | 14 + .../ProximityPlacementGroups_Get.json | 48 + ...tyPlacementGroups_ListByResourceGroup.json | 52 + ...ityPlacementGroups_ListBySubscription.json | 51 + .../ProximityPlacementGroups_Update.json | 28 + ...CreateOrUpdateARestorePointCollection.json | 61 + ...torePointCollectionForCrossRegionCopy.json | 61 + ...orePointCollectionDeleteMaximumSetGen.json | 19 + ...orePointCollectionDeleteMinimumSetGen.json | 19 + ...sContainedInTheRestorePointCollection.json | 31 + ...sContainedInTheRestorePointCollection.json | 99 + .../RestorePointCollections_List.json | 51 + .../RestorePointCollections_ListAll.json | 50 + ...orePointCollectionUpdateMaximumSetGen.json | 195 + ...orePointCollectionUpdateMinimumSetGen.json | 18 + ...e_CopyARestorePointToADifferentRegion.json | 86 + ...torePoints_Create_CreateARestorePoint.json | 90 + ...elete_RestorePointDeleteMaximumSetGen.json | 20 + ...elete_RestorePointDeleteMinimumSetGen.json | 20 + .../RestorePoints_Get_GetARestorePoint.json | 80 + ...s_Get_GetRestorePointWithInstanceView.json | 114 + .../2023-07-01/SharedGalleries_Get.json | 21 + .../2023-07-01/SharedGalleries_List.json | 25 + .../SharedGalleryImageVersions_Get.json | 34 + .../SharedGalleryImageVersions_List.json | 38 + .../2023-07-01/SharedGalleryImages_Get.json | 34 + .../2023-07-01/SharedGalleryImages_List.json | 36 + ...managedBlobFromADifferentSubscription.json | 52 + ...nUnmanagedBlobFromTheSameSubscription.json | 49 + ...napshotFromAnElasticSanVolumeSnapshot.json | 49 + ...shotInTheSameOrADifferentSubscription.json | 49 + ...fferentSubscriptionInADifferentRegion.json | 49 + .../examples/2023-07-01/Snapshots_Delete.json | 19 + ...hots_Get_GetInformationAboutASnapshot.json | 67 + ...InformationAboutAnIncrementalSnapshot.json | 73 + .../2023-07-01/Snapshots_GrantAccess.json | 27 + .../examples/2023-07-01/Snapshots_List.json | 101 + .../Snapshots_ListByResourceGroup.json | 59 + .../2023-07-01/Snapshots_RevokeAccess.json | 18 + .../Snapshots_Update_UpdateASnapshot.json | 60 + ...ateASnapshotWithAcceleratedNetworking.json | 69 + .../2023-07-01/SshPublicKeys_Create.json | 38 + ...elete_SshPublicKeyDeleteMaximumSetGen.json | 14 + ...elete_SshPublicKeyDeleteMinimumSetGen.json | 14 + .../SshPublicKeys_GenerateKeyPair.json | 19 + .../2023-07-01/SshPublicKeys_Get.json | 25 + ...icKeyListByResourceGroupMaximumSetGen.json | 31 + ...icKeyListByResourceGroupMinimumSetGen.json | 21 + ...licKeyListBySubscriptionMaximumSetGen.json | 30 + ...licKeyListBySubscriptionMinimumSetGen.json | 20 + ...pdate_SshPublicKeyUpdateMaximumSetGen.json | 35 + ...pdate_SshPublicKeyUpdateMinimumSetGen.json | 18 + ...MachineExtensionImageGetMaximumSetGen.json | 32 + ...MachineExtensionImageGetMinimumSetGen.json | 21 + ...eExtensionImageListTypesMaximumSetGen.json | 32 + ...eExtensionImageListTypesMinimumSetGen.json | 21 + ...eExtensionCreateOrUpdateMaximumSetGen.json | 148 + ...eExtensionCreateOrUpdateMinimumSetGen.json | 31 + ...alMachineExtensionDeleteMaximumSetGen.json | 20 + ...alMachineExtensionDeleteMinimumSetGen.json | 20 + ...rtualMachineExtensionGetMaximumSetGen.json | 60 + ...rtualMachineExtensionGetMinimumSetGen.json | 19 + ...tualMachineExtensionListMaximumSetGen.json | 63 + ...tualMachineExtensionListMinimumSetGen.json | 15 + .../VirtualMachineExtensions_Update.json | 56 + ...tualMachineRunCommands_CreateOrUpdate.json | 109 + .../VirtualMachineRunCommands_Delete.json | 20 + ...achineRunCommands_GetByVirtualMachine.json | 47 + .../VirtualMachineRunCommands_List.json | 87 + ...chineRunCommands_ListByVirtualMachine.json | 50 + .../VirtualMachineRunCommands_Update.json | 73 + ...tExtensionCreateOrUpdateMaximumSetGen.json | 77 + ...tExtensionCreateOrUpdateMinimumSetGen.json | 23 + ...eScaleSetExtensionDeleteMaximumSetGen.json | 20 + ...eScaleSetExtensionDeleteMinimumSetGen.json | 20 + ...hineScaleSetExtensionGetMaximumSetGen.json | 36 + ...hineScaleSetExtensionGetMinimumSetGen.json | 16 + ...ineScaleSetExtensionListMaximumSetGen.json | 39 + ...ineScaleSetExtensionListMinimumSetGen.json | 19 + ...eScaleSetExtensionUpdateMaximumSetGen.json | 76 + ...eScaleSetExtensionUpdateMinimumSetGen.json | 23 + ...eSetRollingUpgradeCancelMaximumSetGen.json | 18 + ...eSetRollingUpgradeCancelMinimumSetGen.json | 18 + ...tRollingUpgradeGetLatestMaximumSetGen.json | 63 + ...tRollingUpgradeGetLatestMinimumSetGen.json | 18 + ...RollingUpgrades_StartExtensionUpgrade.json | 18 + ...ingUpgradeStartOsUpgradeMaximumSetGen.json | 18 + ...ingUpgradeStartOsUpgradeMinimumSetGen.json | 18 + ...neScaleSetVMExtensions_CreateOrUpdate.json | 59 + ...ualMachineScaleSetVMExtensions_Delete.json | 21 + ...irtualMachineScaleSetVMExtensions_Get.json | 31 + ...rtualMachineScaleSetVMExtensions_List.json | 49 + ...ualMachineScaleSetVMExtensions_Update.json | 42 + ...hineScaleSetVmDeallocateMaximumSetGen.json | 19 + ...hineScaleSetVmDeallocateMinimumSetGen.json | 19 + .../VirtualMachineScaleSetVMs_Delete.json | 21 + ...ualMachineScaleSetVMs_GetInstanceView.json | 67 + ...etVMs_Get_GetVmScaleSetVmWithUserData.json | 135 + ...t_GetVmScaleSetVmWithVmSizeProperties.json | 140 + ...ualMachineScaleSetVmListMaximumSetGen.json | 548 + ...ualMachineScaleSetVmListMinimumSetGen.json | 22 + ...eSetVmPerformMaintenanceMaximumSetGen.json | 19 + ...eSetVmPerformMaintenanceMinimumSetGen.json | 19 + ...achineScaleSetVmPowerOffMaximumSetGen.json | 20 + ...achineScaleSetVmPowerOffMinimumSetGen.json | 19 + ...achineScaleSetVmRedeployMaximumSetGen.json | 19 + ...achineScaleSetVmRedeployMinimumSetGen.json | 19 + ...hineScaleSetVmReimageAllMaximumSetGen.json | 19 + ...hineScaleSetVmReimageAllMinimumSetGen.json | 19 + ...MachineScaleSetVmReimageMaximumSetGen.json | 22 + ...MachineScaleSetVmReimageMinimumSetGen.json | 19 + ...MachineScaleSetVmRestartMaximumSetGen.json | 19 + ...MachineScaleSetVmRestartMinimumSetGen.json | 19 + ...aleSetVMs_RetrieveBootDiagnosticsData.json | 20 + .../VirtualMachineScaleSetVMs_RunCommand.json | 42 + ...alMachineScaleSetVMs_SimulateEviction.json | 14 + ...alMachineScaleSetVmStartMaximumSetGen.json | 19 + ...alMachineScaleSetVmStartMinimumSetGen.json | 19 + ...lMachineScaleSetVmUpdateMaximumSetGen.json | 1535 +++ ...lMachineScaleSetVmUpdateMinimumSetGen.json | 31 + ...rtToSinglePlacementGroupMaximumSetGen.json | 16 + ...rtToSinglePlacementGroupMinimumSetGen.json | 14 + ...eSetFromAnUnmanagedGeneralizedOsImage.json | 204 + ...formImageScaleSetWithUnmanagedOsDisks.json | 224 + ...pdate_CreateAScaleSetFromACustomImage.json | 206 + ...eAScaleSetFromAGeneralizedSharedImage.json | 206 + ...eAScaleSetFromASpecializedSharedImage.json | 185 + ...figHasDisableTcpStateTrackingProperty.json | 279 + ...ateAScaleSetWithAMarketplaceImagePlan.json | 232 + ...ScaleSetWithAnAzureApplicationGateway.json | 232 + ...reateAScaleSetWithAnAzureLoadBalancer.json | 253 + ...CreateAScaleSetWithApplicationProfile.json | 258 + ...eAScaleSetWithAutomaticRepairsEnabled.json | 229 + ...te_CreateAScaleSetWithBootDiagnostics.json | 235 + ...CreateAScaleSetWithDiskControllerType.json | 251 + ...ryptionSetResourceInOsDiskAndDataDisk.json | 257 + ...teAScaleSetWithEmptyDataDisksOnEachVm.json | 272 + ...e_CreateAScaleSetWithEphemeralOsDisks.json | 241 + ...phemeralOsDisksUsingPlacementProperty.json | 244 + ...reateAScaleSetWithExtensionTimeBudget.json | 280 + ...ateAScaleSetWithFpgaNetworkInterfaces.json | 273 + ...cryptionUsingEncryptionAtHostProperty.json | 241 + ...teAScaleSetWithManagedBootDiagnostics.json | 232 + ...erfacesWithPublicIpAddressDnsSettings.json | 305 + ...eSetWithOsImageScheduledEventsEnabled.json | 235 + ...teAScaleSetWithPasswordAuthentication.json | 217 + ...ate_CreateAScaleSetWithPremiumStorage.json | 217 + ..._CreateAScaleSetWithPriorityMixPolicy.json | 236 + ...date_CreateAScaleSetWithScaleInPolicy.json | 235 + ...AScaleSetWithSecurityPostureReference.json | 229 + ...leSetWithSecurityTypeAsConfidentialVm.json | 247 + ...AScaleSetWithServiceArtifactReference.json | 229 + ..._CreateAScaleSetWithSpotRestorePolicy.json | 244 + ..._CreateAScaleSetWithSshAuthentication.json | 241 + ...etWithTerminateScheduledEventsEnabled.json | 235 + ...etWithUefiSettingsOfSecureBootAndVTpm.json | 238 + ...eOrUpdate_CreateAScaleSetWithUserData.json | 230 + ...etWithVirtualMachinesInDifferentZones.json | 286 + ...e_CreateAScaleSetWithVmSizeProperties.json | 248 + ...tensionThatHasSuppressFailuresEnabled.json | 280 + ...sionWithProtectedSettingsFromKeyVault.json | 295 + ...pdateAScaleSetWithCapacityReservation.json | 232 + ...achineScaleSetDeallocateMaximumSetGen.json | 24 + ...achineScaleSetDeallocateMinimumSetGen.json | 18 + .../VirtualMachineScaleSets_Delete.json | 20 + ...eScaleSetDeleteInstancesMaximumSetGen.json | 24 + ...eScaleSetDeleteInstancesMinimumSetGen.json | 23 + ...PlatformUpdateDomainWalkMaximumSetGen.json | 19 + ...PlatformUpdateDomainWalkMinimumSetGen.json | 16 + ...eScaleSetGetInstanceViewMaximumSetGen.json | 50 + ...eScaleSetGetInstanceViewMinimumSetGen.json | 15 + ...leSetGetOsUpgradeHistoryMaximumSetGen.json | 82 + ...leSetGetOsUpgradeHistoryMinimumSetGen.json | 19 + ...leSets_Get_GetAVirtualMachineScaleSet.json | 109 + ...tedHostGroupThroughAutomaticPlacement.json | 94 + ...etAVirtualMachineScaleSetWithUserData.json | 109 + ...GetVmScaleSetVmWithDiskControllerType.json | 110 + ...alMachineScaleSetListAllMaximumSetGen.json | 371 + ...alMachineScaleSetListAllMinimumSetGen.json | 20 + ...irtualMachineScaleSets_ListByLocation.json | 171 + ...lMachineScaleSetListSkusMaximumSetGen.json | 33 + ...lMachineScaleSetListSkusMinimumSetGen.json | 19 + ...rtualMachineScaleSetListMaximumSetGen.json | 687 ++ ...rtualMachineScaleSetListMinimumSetGen.json | 25 + ...aleSetPerformMaintenanceMaximumSetGen.json | 23 + ...aleSetPerformMaintenanceMinimumSetGen.json | 18 + ...lMachineScaleSetPowerOffMaximumSetGen.json | 24 + ...lMachineScaleSetPowerOffMinimumSetGen.json | 18 + ...lMachineScaleSetsReapplyMaximumSetGen.json | 18 + ...lMachineScaleSetsReapplyMinimumSetGen.json | 18 + ...lMachineScaleSetRedeployMaximumSetGen.json | 23 + ...lMachineScaleSetRedeployMinimumSetGen.json | 18 + ...achineScaleSetReimageAllMaximumSetGen.json | 23 + ...achineScaleSetReimageAllMinimumSetGen.json | 18 + ...alMachineScaleSetReimageMaximumSetGen.json | 24 + ...alMachineScaleSetReimageMinimumSetGen.json | 18 + ...alMachineScaleSetRestartMaximumSetGen.json | 23 + ...alMachineScaleSetRestartMinimumSetGen.json | 18 + ...rchestrationServiceStateMaximumSetGen.json | 22 + ...rchestrationServiceStateMinimumSetGen.json | 22 + ...tualMachineScaleSetStartMaximumSetGen.json | 23 + ...tualMachineScaleSetStartMinimumSetGen.json | 18 + ...eScaleSetUpdateInstancesMaximumSetGen.json | 23 + ...eScaleSetUpdateInstancesMinimumSetGen.json | 23 + ...ualMachineScaleSetUpdateMaximumSetGen.json | 651 ++ ...ualMachineScaleSetUpdateMinimumSetGen.json | 18 + .../VirtualMachines_AssessPatches.json | 58 + ...re_VirtualMachineCaptureMaximumSetGen.json | 33 + ...re_VirtualMachineCaptureMinimumSetGen.json | 25 + ...ineConvertToManagedDisksMaximumSetGen.json | 18 + ...ineConvertToManagedDisksMinimumSetGen.json | 18 + ...geVmFromAnUnmanagedGeneralizedOsImage.json | 147 + ...chSettingAssessmentModeOfImageDefault.json | 165 + ...latformAndAutomaticByPlatformSettings.json | 180 + ...hAPatchSettingPatchModeOfImageDefault.json | 165 + ...ssessmentModeSetToAutomaticByPlatform.json | 168 + ...ormImageVmWithUnmanagedOsAndDataDisks.json | 215 + ...e_CreateAVmFromACommunityGalleryImage.json | 146 + ...ateOrUpdate_CreateAVmFromACustomImage.json | 146 + ..._CreateAVmFromAGeneralizedSharedImage.json | 146 + ...date_CreateAVmFromASharedGalleryImage.json | 146 + ..._CreateAVmFromASpecializedSharedImage.json | 125 + ...thCustomerAssignedPlatformFaultDomain.json | 167 + ...OrUpdate_CreateAVmInAnAvailabilitySet.json | 164 + ...te_CreateAVmWithAMarketplaceImagePlan.json | 170 + ...e_CreateAVmWithAnExtensionsTimeBudget.json | 176 + ...pdate_CreateAVmWithApplicationProfile.json | 210 + ...OrUpdate_CreateAVmWithBootDiagnostics.json | 173 + ...pdate_CreateAVmWithDiskControllerType.json | 177 + ...onSetResourceIdInTheOsDiskAndDataDisk.json | 231 + ...eOrUpdate_CreateAVmWithEmptyDataDisks.json | 207 + ...OrUpdate_CreateAVmWithEphemeralOsDisk.json | 179 + ...ningInCacheDiskUsingPlacementProperty.json | 182 + ...gInResourceDiskUsingPlacementProperty.json | 182 + ...pdate_CreateAVmWithHibernationEnabled.json | 182 + ...cryptionUsingEncryptionAtHostProperty.json | 179 + ...e_CreateAVmWithManagedBootDiagnostics.json | 170 + ...eAVmWithNetworkInterfaceConfiguration.json | 176 + ...urationWithPublicIpAddressDnsSettings.json | 180 + ...e_CreateAVmWithPasswordAuthentication.json | 155 + ...eOrUpdate_CreateAVmWithPremiumStorage.json | 155 + ...e_CreateAVmWithScheduledEventsProfile.json | 203 + ...ConfidentialVmWithCustomerManagedKeys.json | 192 + ...ConfidentialVmWithPlatformManagedKeys.json | 183 + ...Update_CreateAVmWithSshAuthentication.json | 179 + ...VmWithUefiSettingsOfSecureBootAndVTpm.json | 176 + ..._CreateOrUpdate_CreateAVmWithUserData.json | 174 + ...rUpdate_CreateAVmWithVmSizeProperties.json | 186 + ...chSettingAssessmentModeOfImageDefault.json | 168 + ...APatchSettingPatchModeOfAutomaticByOs.json | 168 + ...latformAndAutomaticByPlatformSettings.json | 183 + ...PlatformAndEnableHotpatchingSetToTrue.json | 171 + ...sVmWithAPatchSettingPatchModeOfManual.json | 168 + ...ssessmentModeSetToAutomaticByPlatform.json | 171 + ...ateOrUpdateAVmWithCapacityReservation.json | 185 + ...VirtualMachineDeallocateMaximumSetGen.json | 19 + ...VirtualMachineDeallocateMinimumSetGen.json | 18 + .../2023-07-01/VirtualMachines_Delete.json | 20 + .../VirtualMachines_Generalize.json | 13 + ...irtualMachines_Get_GetAVirtualMachine.json | 137 + ...tedHostGroupThroughAutomaticPlacement.json | 69 + ...chineWithDiskControllerTypeProperties.json | 138 + ...etAVirtualMachineWithVmSizeProperties.json | 137 + .../VirtualMachines_InstallPatches.json | 65 + ...tedHostGroupThroughAutomaticPlacement.json | 59 + ...nceView_GetVirtualMachineInstanceView.json | 140 + ...ll_VirtualMachineListAllMaximumSetGen.json | 695 ++ ...ll_VirtualMachineListAllMinimumSetGen.json | 24 + .../VirtualMachines_ListAvailableSizes.json | 34 + .../VirtualMachines_ListByLocation.json | 129 + ..._List_VirtualMachineListMaximumSetGen.json | 932 ++ ..._List_VirtualMachineListMinimumSetGen.json | 25 + ...achinePerformMaintenanceMaximumSetGen.json | 18 + ...achinePerformMaintenanceMinimumSetGen.json | 18 + ...f_VirtualMachinePowerOffMaximumSetGen.json | 19 + ...f_VirtualMachinePowerOffMinimumSetGen.json | 18 + .../2023-07-01/VirtualMachines_Reapply.json | 18 + ...y_VirtualMachineRedeployMaximumSetGen.json | 18 + ...y_VirtualMachineRedeployMinimumSetGen.json | 18 + ...ge_ReimageANonEphemeralVirtualMachine.json | 26 + ...chines_Reimage_ReimageAVirtualMachine.json | 21 + ...rt_VirtualMachineRestartMaximumSetGen.json | 18 + ...rt_VirtualMachineRestartMinimumSetGen.json | 18 + ...lMachines_RetrieveBootDiagnosticsData.json | 19 + .../VirtualMachines_RunCommand.json | 40 + .../VirtualMachines_SimulateEviction.json | 13 + ...tart_VirtualMachineStartMaximumSetGen.json | 18 + ...tart_VirtualMachineStartMinimumSetGen.json | 18 + ...s_Update_UpdateAVmByDetachingDataDisk.json | 137 + ...ate_UpdateAVmByForceDetachingDataDisk.json | 139 + .../test/arm-compute/tsp-output/main.tsp | 29 + .../test/arm-compute/tsp-output/models.tsp | 604 +- .../test/arm-compute/tsp-output/routes.tsp | 4 +- .../openapi-to-typespec/test/arm-dns/dns.md | 126 + .../test/arm-dns/resources.json | 903 ++ .../test/arm-dns/tsp-output/DnsRecord.tsp | 124 + .../test/arm-dns/tsp-output/DnsZone.tsp | 129 + ...dSets_CreateOrUpdate_CreateARecordset.json | 67 + ...eateARecordsetWithAliasTargetResource.json | 63 + ...ts_CreateOrUpdate_CreateAaaaRecordset.json | 67 + ...ets_CreateOrUpdate_CreateCaaRecordset.json | 73 + ...s_CreateOrUpdate_CreateCnameRecordset.json | 61 + ...Sets_CreateOrUpdate_CreateMxRecordset.json | 70 + ...Sets_CreateOrUpdate_CreateNsRecordset.json | 67 + ...ets_CreateOrUpdate_CreatePtrRecordset.json | 67 + ...ets_CreateOrUpdate_CreateSoaRecordset.json | 79 + ...ets_CreateOrUpdate_CreateSrvRecordset.json | 76 + ...ets_CreateOrUpdate_CreateTxtRecordset.json | 76 + .../RecordSets_Delete_DeleteARecordset.json | 16 + ...RecordSets_Delete_DeleteAaaaRecordset.json | 16 + .../RecordSets_Delete_DeleteCaaRecordset.json | 16 + ...ecordSets_Delete_DeleteCnameRecordset.json | 16 + .../RecordSets_Delete_DeleteMxRecordset.json | 16 + .../RecordSets_Delete_DeleteNsRecordset.json | 16 + .../RecordSets_Delete_DeletePtrRecordset.json | 16 + .../RecordSets_Delete_DeleteSrvRecordset.json | 16 + .../RecordSets_Delete_DeleteTxtRecordset.json | 16 + .../RecordSets_Get_GetARecordset.json | 34 + .../RecordSets_Get_GetAaaaRecordset.json | 34 + .../RecordSets_Get_GetCaaRecordset.json | 36 + .../RecordSets_Get_GetCnameRecordset.json | 32 + .../RecordSets_Get_GetMxRecordset.json | 35 + .../RecordSets_Get_GetNsRecordset.json | 34 + .../RecordSets_Get_GetPtrRecordset.json | 34 + .../RecordSets_Get_GetSoaRecordset.json | 38 + .../RecordSets_Get_GetSrvRecordset.json | 37 + .../RecordSets_Get_GetTxtRecordset.json | 37 + .../2018-05-01/RecordSets_ListByDnsZone.json | 73 + ...RecordSets_ListByType_ListARecordsets.json | 38 + ...ordSets_ListByType_ListAaaaRecordsets.json | 38 + ...cordSets_ListByType_ListCaaRecordsets.json | 40 + ...rdSets_ListByType_ListCnameRecordsets.json | 36 + ...ecordSets_ListByType_ListMxRecordsets.json | 39 + ...ecordSets_ListByType_ListNsRecordsets.json | 38 + ...cordSets_ListByType_ListPtrRecordsets.json | 38 + ...cordSets_ListByType_ListSoaRecordsets.json | 42 + ...cordSets_ListByType_ListSrvRecordsets.json | 41 + ...cordSets_ListByType_ListTxtRecordsets.json | 41 + .../RecordSets_Update_PatchARecordset.json | 41 + .../RecordSets_Update_PatchAaaaRecordset.json | 41 + .../RecordSets_Update_PatchCaaRecordset.json | 43 + ...RecordSets_Update_PatchCnameRecordset.json | 39 + .../RecordSets_Update_PatchMxRecordset.json | 42 + .../RecordSets_Update_PatchNsRecordset.json | 41 + .../RecordSets_Update_PatchPtrRecordset.json | 41 + .../RecordSets_Update_PatchSoaRecordset.json | 45 + .../RecordSets_Update_PatchSrvRecordset.json | 44 + .../RecordSets_Update_PatchTxtRecordset.json | 44 + .../2018-05-01/Zones_CreateOrUpdate.json | 64 + .../examples/2018-05-01/Zones_Delete.json | 19 + .../examples/2018-05-01/Zones_Get.json | 34 + .../examples/2018-05-01/Zones_List.json | 54 + .../2018-05-01/Zones_ListByResourceGroup.json | 55 + .../examples/2018-05-01/Zones_Update.json | 39 + .../test/arm-dns/tsp-output/main.tsp | 39 + .../test/arm-dns/tsp-output/models.tsp | 325 + .../test/arm-dns/tsp-output/routes.tsp | 28 + .../test/arm-dns/tsp-output/tspconfig.yaml | 11 + .../machinelearningservices.md | 610 ++ .../resources.json | 3472 +++++++ .../BatchDeploymentTrackedResource.tsp | 79 + .../BatchEndpointTrackedResource.tsp | 84 + .../tsp-output/CodeContainerResource.tsp | 60 + .../tsp-output/CodeVersionResource.tsp | 76 + .../tsp-output/ComponentContainerResource.tsp | 60 + .../tsp-output/ComponentVersionResource.tsp | 71 + .../tsp-output/ComputeResource.tsp | 120 + .../tsp-output/DataContainerResource.tsp | 63 + .../tsp-output/DataVersionBaseResource.tsp | 87 + .../tsp-output/DatastoreResource.tsp | 100 + .../EnvironmentContainerResource.tsp | 64 + .../tsp-output/EnvironmentVersionResource.tsp | 75 + .../tsp-output/Feature.tsp | 50 + .../tsp-output/FeaturesetContainer.tsp | 71 + .../tsp-output/FeaturesetVersion.tsp | 114 + .../FeaturestoreEntityContainer.tsp | 72 + .../tsp-output/FeaturestoreEntityVersion.tsp | 80 + .../tsp-output/JobBaseResource.tsp | 99 + .../tsp-output/LabelingJob.tsp | 85 + .../tsp-output/ModelContainerResource.tsp | 64 + .../tsp-output/ModelVersionResource.tsp | 103 + .../OnlineDeploymentTrackedResource.tsp | 132 + .../OnlineEndpointTrackedResource.tsp | 124 + .../tsp-output/OutboundRuleBasicResource.tsp | 51 + .../tsp-output/PrivateEndpointConnection.tsp | 45 + .../tsp-output/Registry.tsp | 64 + .../tsp-output/Schedule.tsp | 55 + .../tsp-output/Workspace.tsp | 228 + ...aceConnectionPropertiesV2BasicResource.tsp | 78 + .../BatchDeployments_CreateOrUpdate.json | 222 + .../BatchDeployments_Delete.json | 21 + .../BatchDeployments_Get.json | 90 + .../BatchDeployments_List.json | 97 + .../BatchDeployments_Update.json | 103 + .../BatchEndpoints_CreateOrUpdate.json | 141 + .../BatchEndpoints_Delete.json | 20 + .../BatchEndpoints_Get.json | 62 + .../BatchEndpoints_List.json | 68 + .../BatchEndpoints_ListKeys.json | 20 + .../BatchEndpoints_Update.json | 79 + ...eateOrUpdate_AttachAKubernetesCompute.json | 125 + ...pute_CreateOrUpdate_CreateAAmlCompute.json | 62 + ...ateOrUpdate_CreateADataFactoryCompute.json | 46 + ...ute_CreateOrUpdate_CreateAnAksCompute.json | 46 + ...Update_CreateAnComputeInstanceCompute.json | 101 + ...mputeInstanceComputeWithMinimalInputs.json | 49 + ...AnComputeInstanceComputeWithSchedules.json | 74 + ...pute_CreateOrUpdate_UpdateAAmlCompute.json | 88 + ...ute_CreateOrUpdate_UpdateAnAksCompute.json | 58 + .../2023-06-01-preview/Compute_Delete.json | 22 + .../Compute_Get_GetAAksCompute.json | 29 + .../Compute_Get_GetAAmlCompute.json | 58 + .../Compute_Get_GetAKubernetesCompute.json | 56 + .../Compute_Get_GetAnComputeInstance.json | 116 + .../2023-06-01-preview/Compute_List.json | 47 + .../2023-06-01-preview/Compute_ListKeys.json | 21 + .../2023-06-01-preview/Compute_ListNodes.json | 35 + .../2023-06-01-preview/Compute_Restart.json | 18 + .../2023-06-01-preview/Compute_Start.json | 18 + .../2023-06-01-preview/Compute_Stop.json | 18 + .../2023-06-01-preview/Compute_Update.json | 40 + .../Compute_UpdateCustomServices.json | 49 + .../Compute_UpdateIdleShutdownSetting.json | 17 + ...OrUpdateDatastoreAzureBlobWAccountKey.json | 105 + ...oreAzureDataLakeGen1WServicePrincipal.json | 106 + ...oreAzureDataLakeGen2WServicePrincipal.json | 115 + ...ateDatastoreAzureFileStoreWAccountKey.json | 103 + .../2023-06-01-preview/Datastores_Delete.json | 15 + .../2023-06-01-preview/Datastores_Get.json | 48 + .../2023-06-01-preview/Datastores_List.json | 61 + .../Datastores_ListSecrets.json | 20 + .../2023-06-01-preview/Features_Get.json | 42 + .../2023-06-01-preview/Features_List.json | 50 + .../FeaturesetContainers_CreateOrUpdate.json | 83 + .../FeaturesetContainers_Delete.json | 20 + .../FeaturesetContainers_GetEntity.json | 42 + .../FeaturesetContainers_List.json | 49 + .../FeaturesetVersions_Backfill.json | 42 + .../FeaturesetVersions_CreateOrUpdate.json | 221 + .../FeaturesetVersions_Delete.json | 21 + .../FeaturesetVersions_Get.json | 88 + .../FeaturesetVersions_List.json | 95 + ...resetVersions_ListMaterializationJobs.json | 42 + ...estoreEntityContainers_CreateOrUpdate.json | 83 + .../FeaturestoreEntityContainers_Delete.json | 20 + ...eaturestoreEntityContainers_GetEntity.json | 42 + .../FeaturestoreEntityContainers_List.json | 49 + ...urestoreEntityVersions_CreateOrUpdate.json | 101 + .../FeaturestoreEntityVersions_Delete.json | 21 + .../FeaturestoreEntityVersions_Get.json | 48 + .../FeaturestoreEntityVersions_List.json | 55 + .../2023-06-01-preview/Jobs_Cancel.json | 19 + ...reateOrUpdate_CreateOrUpdateAutoMlJob.json | 335 + ...eateOrUpdate_CreateOrUpdateCommandJob.json | 335 + ...ateOrUpdate_CreateOrUpdatePipelineJob.json | 170 + ...CreateOrUpdate_CreateOrUpdateSweepJob.json | 335 + .../2023-06-01-preview/Jobs_Delete.json | 20 + .../Jobs_Get_GetAutoMlJob.json | 127 + .../Jobs_Get_GetCommandJob.json | 127 + .../Jobs_Get_GetPipelineJob.json | 71 + .../Jobs_Get_GetSweepJob.json | 127 + .../Jobs_List_ListAutoMlJob.json | 138 + .../Jobs_List_ListCommandJob.json | 138 + .../Jobs_List_ListPipelineJob.json | 78 + .../Jobs_List_ListSweepJob.json | 138 + .../2023-06-01-preview/Jobs_Update.json | 156 + .../LabelingJobs_CreateOrUpdate.json | 244 + .../LabelingJobs_Delete.json | 15 + .../LabelingJobs_ExportLabels.json | 30 + .../2023-06-01-preview/LabelingJobs_Get.json | 102 + .../2023-06-01-preview/LabelingJobs_List.json | 106 + .../LabelingJobs_Pause.json | 14 + .../LabelingJobs_Resume.json | 19 + ...orkProvisions_ProvisionManagedNetwork.json | 26 + ...gedNetworkSettingsRule_CreateOrUpdate.json | 40 + .../ManagedNetworkSettingsRule_Delete.json | 20 + .../ManagedNetworkSettingsRule_Get.json | 27 + .../ManagedNetworkSettingsRule_List.json | 41 + ...ateOrUpdateKubernetesOnlineDeployment.json | 246 + ...CreateOrUpdateManagedOnlineDeployment.json | 231 + .../OnlineDeployments_Delete.json | 21 + .../OnlineDeployments_GetLogs.json | 23 + ...nts_Get_GetKubernetesOnlineDeployment.json | 98 + ...yments_Get_GetManagedOnlineDeployment.json | 93 + .../OnlineDeployments_List.json | 105 + ...us_ListKubernetesOnlineDeploymentSkus.json | 37 + ...tSkus_ListManagedOnlineDeploymentSkus.json | 37 + ...date_UpdateKubernetesOnlineDeployment.json | 113 + ..._Update_UpdateManagedOnlineDeployment.json | 108 + .../OnlineEndpoints_CreateOrUpdate.json | 144 + .../OnlineEndpoints_Delete.json | 20 + .../OnlineEndpoints_Get.json | 64 + .../OnlineEndpoints_GetToken.json | 22 + .../OnlineEndpoints_List.json | 75 + .../OnlineEndpoints_ListKeys.json | 20 + .../OnlineEndpoints_RegenerateKeys.json | 24 + .../OnlineEndpoints_Update.json | 78 + ...ateEndpointConnections_CreateOrUpdate.json | 40 + .../PrivateEndpointConnections_Delete.json | 16 + .../PrivateEndpointConnections_Get.json | 32 + .../PrivateEndpointConnections_List.json | 52 + .../PrivateLinkResources_List.json | 30 + .../Registries_CreateOrUpdate.json | 280 + .../2023-06-01-preview/Registries_Delete.json | 20 + .../2023-06-01-preview/Registries_Get.json | 108 + .../2023-06-01-preview/Registries_List.json | 112 + .../Registries_ListBySubscription.json | 111 + .../Registries_RemoveRegions.json | 190 + .../2023-06-01-preview/Registries_Update.json | 124 + ...RegistryCodeContainers_CreateOrUpdate.json | 66 + .../RegistryCodeContainers_Delete.json | 20 + .../RegistryCodeContainers_Get.json | 35 + .../RegistryCodeContainers_List.json | 60 + ...ersions_CreateOrGetStartPendingUpload.json | 33 + .../RegistryCodeVersions_CreateOrUpdate.json | 81 + .../RegistryCodeVersions_Delete.json | 21 + .../RegistryCodeVersions_Get.json | 41 + .../RegistryCodeVersions_List.json | 48 + ...tryComponentContainers_CreateOrUpdate.json | 74 + .../RegistryComponentContainers_Delete.json | 20 + .../RegistryComponentContainers_Get.json | 38 + .../RegistryComponentContainers_List.json | 44 + ...istryComponentVersions_CreateOrUpdate.json | 87 + .../RegistryComponentVersions_Delete.json | 21 + .../RegistryComponentVersions_Get.json | 43 + .../RegistryComponentVersions_List.json | 50 + ...RegistryDataContainers_CreateOrUpdate.json | 84 + .../RegistryDataContainers_Delete.json | 20 + .../RegistryDataContainers_Get.json | 42 + .../RegistryDataContainers_List.json | 48 + ...ersions_CreateOrGetStartPendingUpload.json | 33 + .../RegistryDataVersions_CreateOrUpdate.json | 96 + .../RegistryDataVersions_Delete.json | 21 + .../RegistryDataVersions_Get.json | 46 + .../RegistryDataVersions_List.json | 55 + ...yEnvironmentContainers_CreateOrUpdate.json | 84 + .../RegistryEnvironmentContainers_Delete.json | 20 + .../RegistryEnvironmentContainers_Get.json | 35 + .../RegistryEnvironmentContainers_List.json | 41 + ...tryEnvironmentVersions_CreateOrUpdate.json | 140 + .../RegistryEnvironmentVersions_Delete.json | 21 + .../RegistryEnvironmentVersions_Get.json | 61 + .../RegistryEnvironmentVersions_List.json | 68 + ...egistryModelContainers_CreateOrUpdate.json | 66 + .../RegistryModelContainers_Delete.json | 20 + .../RegistryModelContainers_Get.json | 35 + .../RegistryModelContainers_List.json | 40 + ...ersions_CreateOrGetStartPendingUpload.json | 33 + .../RegistryModelVersions_CreateOrUpdate.json | 105 + .../RegistryModelVersions_Delete.json | 21 + .../RegistryModelVersions_Get.json | 49 + .../RegistryModelVersions_List.json | 61 + .../RegistryModelVersions_Package.json | 95 + .../Schedules_CreateOrUpdate.json | 121 + .../2023-06-01-preview/Schedules_Delete.json | 21 + .../2023-06-01-preview/Schedules_Get.json | 54 + .../2023-06-01-preview/Schedules_List.json | 59 + .../WorkspaceConnections_Create.json | 34 + .../WorkspaceConnections_Delete.json | 15 + .../WorkspaceConnections_Get.json | 26 + .../WorkspaceConnections_List.json | 41 + .../WorkspaceConnections_ListSecrets.json | 40 + .../WorkspaceConnections_Update.json | 53 + .../WorkspaceFeatures_List.json | 28 + .../Workspaces_CreateOrUpdate.json | 111 + .../2023-06-01-preview/Workspaces_Delete.json | 19 + .../Workspaces_Diagnose.json | 51 + .../2023-06-01-preview/Workspaces_Get.json | 102 + .../Workspaces_ListByResourceGroup.json | 48 + .../Workspaces_ListBySubscription.json | 47 + .../Workspaces_ListKeys.json | 37 + .../Workspaces_ListNotebookAccessToken.json | 22 + .../Workspaces_ListNotebookKeys.json | 18 + ...tOutboundNetworkDependenciesEndpoints.json | 48 + .../Workspaces_ListStorageAccountKeys.json | 17 + .../Workspaces_PrepareNotebook.json | 27 + .../Workspaces_ResyncKeys.json | 18 + .../2023-06-01-preview/Workspaces_Update.json | 47 + .../tsp-output/main.tsp | 68 + .../tsp-output/models.tsp | 8774 +++++++++++++++++ .../tsp-output/routes.tsp | 1608 +++ .../tsp-output/tspconfig.yaml | 11 + .../tsp-output/DataProduct.tsp | 31 +- .../tsp-output/DataProductsCatalog.tsp | 6 +- .../tsp-output/DataType.tsp | 31 +- ..._DataProductsCatalogsGetMaximumSetGen.json | 45 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 16 + ...alogsListByResourceGroupMaximumSetGen.json | 50 + ...alogsListByResourceGroupMinimumSetGen.json | 20 + ...talogsListBySubscriptionMaximumSetGen.json | 49 + ...talogsListBySubscriptionMinimumSetGen.json | 19 + ..._DataProductsAddUserRoleMaximumSetGen.json | 35 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 35 + ...reate_DataProductsCreateMaximumSetGen.json | 252 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 38 + ...elete_DataProductsDeleteMaximumSetGen.json | 18 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 18 + ...teStorageAccountSasTokenMaximumSetGen.json | 22 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 22 + ...ucts_Get_DataProductsGetMaximumSetGen.json | 102 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 18 + ...ductsListByResourceGroupMaximumSetGen.json | 106 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 21 + ...oductsListBySubscriptionMaximumSetGen.json | 105 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 20 + ...uctsListRolesAssignmentsMaximumSetGen.json | 31 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 31 + ...taProductsRemoveUserRoleMaximumSetGen.json | 24 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 24 + ...ey_DataProductsRotateKeyMaximumSetGen.json | 16 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 16 + ...pdate_DataProductsUpdateMaximumSetGen.json | 129 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 23 + ...s_Create_DataTypesCreateMaximumSetGen.json | 73 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 23 + ...Data_DataTypesDeleteDataMaximumSetGen.json | 20 + ...Data_DataTypesDeleteDataMinimumSetGen.json | 20 + ...s_Delete_DataTypesDeleteMaximumSetGen.json | 19 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 19 + ...StorageContainerSasTokenMaximumSetGen.json | 23 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 23 + ...taTypes_Get_DataTypesGetMaximumSetGen.json | 37 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 18 + ...taTypesListByDataProductMaximumSetGen.json | 41 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 21 + ...s_Update_DataTypesUpdateMaximumSetGen.json | 50 + ...eneratedByMinimumSetRuleMinimumSetGen.json | 22 + .../arm-networkanalytics/tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 91 +- .../tsp-output/Account.tsp | 21 +- .../tsp-output/Quota.tsp | 3 + .../Accounts_CreateOrUpdate.json | 76 + .../2023-10-01-preview/Accounts_Delete.json | 19 + .../2023-10-01-preview/Accounts_Get.json | 38 + .../Accounts_ListByResourceGroup.json | 41 + .../Accounts_ListBySubscription.json | 40 + .../2023-10-01-preview/Accounts_Update.json | 47 + .../2023-10-01-preview/Quotas_Get.json | 31 + .../Quotas_ListBySubscription.json | 34 + .../arm-playwrighttesting/tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 47 + .../tsp-output/Association.tsp | 32 +- .../tsp-output/Frontend.tsp | 32 +- .../tsp-output/TrafficController.tsp | 35 +- .../AssociationsInterface_CreateOrUpdate.json | 51 + .../AssociationsInterface_Delete.json | 21 + .../2023-11-01/AssociationsInterface_Get.json | 28 + ...ionsInterface_ListByTrafficController.json | 31 + .../AssociationsInterface_Update.json | 35 + .../FrontendsInterface_CreateOrUpdate.json | 41 + .../2023-11-01/FrontendsInterface_Delete.json | 21 + .../2023-11-01/FrontendsInterface_Get.json | 25 + ...endsInterface_ListByTrafficController.json | 28 + .../2023-11-01/FrontendsInterface_Update.json | 26 + ...ficControllerInterface_CreateOrUpdate.json | 72 + .../TrafficControllerInterface_Delete.json | 20 + .../TrafficControllerInterface_Get.json | 39 + ...ntrollerInterface_ListByResourceGroup.json | 42 + ...ontrollerInterface_ListBySubscription.json | 41 + .../TrafficControllerInterface_Update.json | 44 + .../arm-servicenetworking/tsp-output/main.tsp | 1 + .../tsp-output/models.tsp | 53 + .../test/arm-sphere/tsp-output/Catalog.tsp | 26 +- .../arm-sphere/tsp-output/Certificate.tsp | 5 + .../test/arm-sphere/tsp-output/Deployment.tsp | 17 +- .../test/arm-sphere/tsp-output/Device.tsp | 30 +- .../arm-sphere/tsp-output/DeviceGroup.tsp | 31 +- .../test/arm-sphere/tsp-output/Image.tsp | 17 +- .../test/arm-sphere/tsp-output/Product.tsp | 27 +- .../Catalogs_CountDevices.json | 18 + .../Catalogs_CreateOrUpdate.json | 34 + .../2022-09-01-preview/Catalogs_Delete.json | 24 + .../2022-09-01-preview/Catalogs_Get.json | 21 + .../Catalogs_ListByResourceGroup.json | 30 + .../Catalogs_ListBySubscription.json | 29 + .../Catalogs_ListDeployments.json | 27 + .../Catalogs_ListDeviceGroups.json | 32 + .../Catalogs_ListDeviceInsights.json | 40 + .../Catalogs_ListDevices.json | 27 + .../2022-09-01-preview/Catalogs_Update.json | 25 + .../2022-09-01-preview/Certificates_Get.json | 17 + .../Certificates_ListByCatalog.json | 18 + .../Certificates_RetrieveCertChain.json | 19 + ...icates_RetrieveProofOfPossessionNonce.json | 22 + .../Deployments_CreateOrUpdate.json | 47 + .../Deployments_Delete.json | 27 + .../2022-09-01-preview/Deployments_Get.json | 38 + .../Deployments_ListByDeviceGroup.json | 42 + .../DeviceGroups_ClaimDevices.json | 25 + .../DeviceGroups_CountDevices.json | 20 + .../DeviceGroups_CreateOrUpdate.json | 46 + .../DeviceGroups_Delete.json | 26 + .../2022-09-01-preview/DeviceGroups_Get.json | 26 + .../DeviceGroups_ListByProduct.json | 30 + .../DeviceGroups_Update.json | 33 + .../Devices_CreateOrUpdate.json | 34 + .../2022-09-01-preview/Devices_Delete.json | 27 + .../Devices_GenerateCapabilityImage.json | 32 + .../2022-09-01-preview/Devices_Get.json | 29 + .../Devices_ListByDeviceGroup.json | 29 + .../2022-09-01-preview/Devices_Update.json | 36 + .../Images_CreateOrUpdate.json | 34 + .../2022-09-01-preview/Images_Delete.json | 25 + .../2022-09-01-preview/Images_Get.json | 17 + .../Images_ListByCatalog.json | 27 + .../Products_CountDevices.json | 21 + .../Products_CreateOrUpdate.json | 30 + .../2022-09-01-preview/Products_Delete.json | 25 + .../Products_GenerateDefaultDeviceGroups.json | 40 + .../2022-09-01-preview/Products_Get.json | 23 + .../Products_ListByCatalog.json | 29 + .../2022-09-01-preview/Products_Update.json | 30 + .../test/arm-sphere/tsp-output/main.tsp | 1 + .../test/arm-sphere/tsp-output/models.tsp | 85 + .../arm-storage/tsp-output/BlobContainer.tsp | 20 +- .../tsp-output/BlobInventoryPolicy.tsp | 7 +- .../tsp-output/BlobServiceProperties.tsp | 33 +- .../arm-storage/tsp-output/DeletedAccount.tsp | 3 + .../tsp-output/EncryptionScope.tsp | 7 +- .../tsp-output/FileServiceProperties.tsp | 33 +- .../test/arm-storage/tsp-output/FileShare.tsp | 10 +- .../tsp-output/ImmutabilityPolicy.tsp | 32 +- .../test/arm-storage/tsp-output/LocalUser.tsp | 7 + .../tsp-output/ManagementPolicy.tsp | 6 +- .../tsp-output/ObjectReplicationPolicy.tsp | 5 + .../tsp-output/PrivateEndpointConnection.tsp | 5 + .../tsp-output/QueueServiceProperties.tsp | 33 +- .../arm-storage/tsp-output/StorageAccount.tsp | 45 +- .../arm-storage/tsp-output/StorageQueue.tsp | 20 +- .../test/arm-storage/tsp-output/Table.tsp | 20 +- .../tsp-output/TableServiceProperties.tsp | 33 +- .../BlobContainers_ClearLegalHold.json | 27 + ...licy_CreateOrUpdateImmutabilityPolicy.json | 34 + ...licyWithAllowProtectedAppendWritesAll.json | 34 + ...utContainerWithDefaultEncryptionScope.json | 42 + ...reate_PutContainerWithObjectLevelWorm.json | 45 + .../BlobContainers_Create_PutContainers.json | 29 + .../2022-09-01/BlobContainers_Delete.json | 16 + ...obContainers_DeleteImmutabilityPolicy.json | 28 + ...obContainers_ExtendImmutabilityPolicy.json | 32 + .../BlobContainers_GetImmutabilityPolicy.json | 28 + ...sGetWithAllowProtectedAppendWritesAll.json | 91 + .../BlobContainers_Get_GetContainers.json | 83 + ...iners_Lease_AcquireALeaseOnAContainer.json | 26 + ...tainers_Lease_BreakALeaseOnAContainer.json | 26 + .../BlobContainers_List_ListContainers.json | 48 + ...Containers_List_ListDeletedContainers.json | 52 + ...BlobContainers_LockImmutabilityPolicy.json | 27 + .../BlobContainers_ObjectLevelWorm.json | 21 + ...s_SetLegalHold_SetLegalHoldContainers.json | 31 + ...nersWithAllowProtectedAppendWritesAll.json | 33 + .../2022-09-01/BlobContainers_Update.json | 37 + ..._StorageAccountSetBlobInventoryPolicy.json | 164 + ...ncludeDeleteAndNewSchemaForHnsAccount.json | 199 + ...udeDeleteAndNewSchemaForNonHnsAccount.json | 197 + .../BlobInventoryPolicies_Delete.json | 16 + .../2022-09-01/BlobInventoryPolicies_Get.json | 67 + .../BlobInventoryPolicies_List.json | 70 + .../BlobServices_GetServiceProperties.json | 98 + .../2022-09-01/BlobServices_List.json | 101 + ...s_BlobServicesPutAllowPermanentDelete.json | 39 + ...ervicesPutLastAccessTimeBasedTracking.json | 43 + ..._SetServiceProperties_PutBlobServices.json | 173 + .../2022-09-01/DeletedAccounts_Get.json | 27 + .../2022-09-01/DeletedAccounts_List.json | 41 + .../2022-09-01/EncryptionScopes_Get.json | 27 + .../2022-09-01/EncryptionScopes_List.json | 45 + .../2022-09-01/EncryptionScopes_Patch.json | 40 + ..._Put_StorageAccountPutEncryptionScope.json | 41 + ...tionScopeWithInfrastructureEncryption.json | 47 + .../FileServices_GetServiceProperties.json | 88 + .../2022-09-01/FileServices_List.json | 91 + ..._SetServiceProperties_PutFileServices.json | 153 + ...utFileServicesEnableSecureSmbFeatures.json | 47 + ..._PutFileServicesEnableSmbMultichannel.json | 45 + .../FileShares_Create_CreateNfsShares.json | 39 + .../FileShares_Create_PutShares.json | 29 + ...Shares_Create_PutSharesWithAccessTier.json | 39 + .../2022-09-01/FileShares_Delete.json | 16 + .../FileShares_Get_GetShareStats.json | 28 + .../2022-09-01/FileShares_Get_GetShares.json | 26 + ...ileShares_Lease_AcquireALeaseOnAShare.json | 26 + .../FileShares_Lease_BreakALeaseOnAShare.json | 26 + .../FileShares_List_ListDeletedShares.json | 44 + .../FileShares_List_ListShareSnapshots.json | 41 + .../FileShares_List_ListShares.json | 40 + .../2022-09-01/FileShares_Restore.json | 19 + .../FileShares_Update_UpdateShareAcls.json | 47 + .../FileShares_Update_UpdateShares.json | 33 + ...lUsers_CreateOrUpdate_CreateLocalUser.json | 67 + ...lUsers_CreateOrUpdate_UpdateLocalUser.json | 36 + .../2022-09-01/LocalUsers_Delete.json | 16 + .../examples/2022-09-01/LocalUsers_Get.json | 40 + .../examples/2022-09-01/LocalUsers_List.json | 61 + .../2022-09-01/LocalUsers_ListKeys.json | 25 + .../LocalUsers_RegeneratePassword.json | 19 + ...e_StorageAccountSetManagementPolicies.json | 182 + ...olicyBaseBlobDaysAfterCreationActions.json | 92 + ...untSetManagementPolicyColdTierActions.json | 130 + ...anagementPolicyForBlockAndAppendBlobs.json | 102 + ...ountSetManagementPolicyHotTierActions.json | 100 + ...tPolicyLastAccessTimeBasedBlobActions.json | 104 + ...gementPolicyLastTierChangeTimeActions.json | 118 + ...anagementPolicyWithSnapshotAndVersion.json | 136 + .../2022-09-01/ManagementPolicies_Delete.json | 16 + .../2022-09-01/ManagementPolicies_Get.json | 61 + ...eObjectReplicationPolicyOnDestination.json | 57 + ...CreateObjectReplicationPolicyOnSource.json | 61 + ...eObjectReplicationPolicyOnDestination.json | 67 + ...UpdateObjectReplicationPolicyOnSource.json | 69 + .../ObjectReplicationPolicies_Delete.json | 16 + .../ObjectReplicationPolicies_Get.json | 49 + .../ObjectReplicationPolicies_List.json | 37 + .../PrivateEndpointConnections_Delete.json | 16 + .../PrivateEndpointConnections_Get.json | 32 + .../PrivateEndpointConnections_List.json | 51 + .../PrivateEndpointConnections_Put.json | 40 + ...ateLinkResources_ListByStorageAccount.json | 103 + .../QueueServices_GetServiceProperties.json | 84 + .../2022-09-01/QueueServices_List.json | 87 + .../QueueServices_SetServiceProperties.json | 149 + .../Queue_Create_QueueOperationPut.json | 22 + ..._Create_QueueOperationPutWithMetadata.json | 35 + .../examples/2022-09-01/Queue_Delete.json | 15 + .../examples/2022-09-01/Queue_Get.json | 27 + .../examples/2022-09-01/Queue_List.json | 42 + .../examples/2022-09-01/Queue_Update.json | 22 + ...s_AbortHierarchicalNamespaceMigration.json | 18 + ...StorageAccounts_CheckNameAvailability.json | 19 + ...ageAccounts_Create_NfsV3AccountCreate.json | 63 + ...eAccounts_Create_StorageAccountCreate.json | 151 + ...ageAccountCreateAllowedCopyScopeToAad.json | 146 + ...ntCreateAllowedCopyScopeToPrivateLink.json | 146 + ...ountCreateDisallowPublicNetworkAccess.json | 150 + ...ntCreateDnsEndpointTypeToAzureDnsZone.json | 153 + ...ccountCreateDnsEndpointTypeToStandard.json | 153 + ...ccountCreateEnablePublicNetworkAccess.json | 150 + ...eAccountCreatePremiumBlockBlobStorage.json | 91 + ...UserAssignedEncryptionIdentityWithCmk.json | 120 + ...IdentityWithFederatedIdentityClientId.json | 122 + ...geAccountCreateWithImmutabilityPolicy.json | 72 + .../2022-09-01/StorageAccounts_Delete.json | 15 + ...ounts_Failover_StorageAccountFailover.json | 19 + ...ailover_StorageAccountFailoverPlanned.json | 20 + ...ageAccountGetAsyncSkuConversionStatus.json | 36 + ...roperties_StorageAccountGetProperties.json | 103 + ...StorageAccountGetPropertiesCmkEnabled.json | 106 + ...GetPropertiesCmkVersionExpirationTime.json | 107 + ...counts_HierarchicalNamespaceMigration.json | 19 + .../2022-09-01/StorageAccounts_List.json | 315 + .../StorageAccounts_ListAccountSAS.json | 27 + .../StorageAccounts_ListByResourceGroup.json | 80 + .../2022-09-01/StorageAccounts_ListKeys.json | 29 + .../StorageAccounts_ListServiceSAS.json | 24 + ...teKey_StorageAccountRegenerateKerbKey.json | 37 + ...nerateKey_StorageAccountRegenerateKey.json | 32 + .../StorageAccounts_RestoreBlobRanges.json | 66 + ...rageAccounts_RevokeUserDelegationKeys.json | 13 + ...ccounts_Update_StorageAccountEnableAd.json | 77 + ...counts_Update_StorageAccountEnableCmk.json | 96 + ...eAccounts_Update_StorageAccountUpdate.json | 154 + ...ageAccountUpdateAllowedCopyScopeToAad.json | 151 + ...countUpdateDisablePublicNetworkAccess.json | 151 + ...UserAssignedEncryptionIdentityWithCmk.json | 118 + ...IdentityWithFederatedIdentityClientId.json | 120 + ...geAccountUpdateWithImmutabilityPolicy.json | 52 + .../TableServices_GetServiceProperties.json | 84 + .../2022-09-01/TableServices_List.json | 87 + .../TableServices_SetServiceProperties.json | 149 + .../Table_Create_TableOperationPut.json | 24 + ...e_Create_TableOperationPutOrPatchAcls.json | 64 + .../examples/2022-09-01/Table_Delete.json | 15 + .../examples/2022-09-01/Table_Get.json | 24 + .../examples/2022-09-01/Table_List.json | 36 + .../Table_Update_TableOperationPatch.json | 24 + ...e_Update_TableOperationPutOrPatchAcls.json | 64 + .../test/arm-storage/tsp-output/main.tsp | 4 +- .../test/arm-storage/tsp-output/models.tsp | 207 +- .../test/arm-storage/tsp-output/routes.tsp | 2 + .../test/arm-test/tsp-output/DictProperty.tsp | 3 + .../test/arm-test/tsp-output/Employee.tsp | 15 +- .../test/arm-test/tsp-output/Enroll.tsp | 4 +- .../test/arm-test/tsp-output/main.tsp | 1 + .../test/arm-test/tsp-output/models.tsp | 45 + .../test/batch/tsp-output/main.tsp | 1 + .../test/batch/tsp-output/models.tsp | 240 +- .../test/bodyComplex/tsp-output/main.tsp | 1 + .../test/bodyComplex/tsp-output/models.tsp | 1 + .../test/complexObject/tsp-output/main.tsp | 1 + .../confidentialLedger/tsp-output/main.tsp | 1 + .../confidentialLedger/tsp-output/models.tsp | 3 + .../test/keyvault/tsp-output/main.tsp | 1 + .../test/keyvault/tsp-output/models.tsp | 33 +- .../test/loadTest/tsp-output/main.tsp | 1 + .../test/loadTest/tsp-output/models.tsp | 21 + .../test/nh/tsp-output/main.tsp | 1 + .../test/nh/tsp-output/models.tsp | 5 +- .../test/openAI/tsp-output/main.tsp | 1 + .../test/pagination/tsp-output/main.tsp | 1 + .../test/pagination/tsp-output/models.tsp | 1 + .../test/qna/tsp-output/main.tsp | 1 + .../test/qna/tsp-output/models.tsp | 9 + .../test/qnaAuthoring/tsp-output/main.tsp | 1 + .../test/qnaAuthoring/tsp-output/models.tsp | 6 + .../test/qnaAuthoring/tsp-output/routes.tsp | 4 +- .../test/qnaRuntime/tsp-output/models.tsp | 2 + .../test/schemaRegistry/tsp-output/main.tsp | 1 + .../test/url/tsp-output/models.tsp | 3 +- .../test/webpubsub/tsp-output/main.tsp | 1 + .../test/webpubsub/tsp-output/models.tsp | 5 +- 1736 files changed, 132222 insertions(+), 847 deletions(-) create mode 100644 common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/dns.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp create mode 100644 packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json create mode 100644 packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json diff --git a/.prettierignore b/.prettierignore index 6ccf146fc2..951512e228 100644 --- a/.prettierignore +++ b/.prettierignore @@ -338,5 +338,6 @@ packages/extensions/core/test/plugins/*/expected/*.json # MICROSOFT SECURITY.md /SECURITY.md -# Generated typespec +# Generated typespec and examples packages/extensions/openapi-to-typespec/test/**/*.tsp +packages/extensions/openapi-to-typespec/test/**/*.json diff --git a/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json b/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json new file mode 100644 index 0000000000..ac5cf8d547 --- /dev/null +++ b/common/changes/@autorest/openapi-to-typespec/fix_converter_2024-01-08-09-46.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@autorest/openapi-to-typespec", + "comment": "Fix validation issues for converter", + "type": "patch" + } + ], + "packageName": "@autorest/openapi-to-typespec" +} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e384513d3c..4eb9ea1f6b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -197,6 +197,9 @@ dependencies: chalk: specifier: ^4.1.0 version: 4.1.2 + change-case-all: + specifier: ~2.1.0 + version: 2.1.0 cli-progress: specifier: ~3.10.0 version: 3.10.0 @@ -2652,6 +2655,15 @@ packages: supports-color: 7.2.0 dev: false + /change-case-all@2.1.0: + resolution: {integrity: sha512-v6b0WWWkZUMHVuYk82l+WROgkUm4qEN2w5hKRNWtEOYwWqUGoi8C6xH0l1RLF1EoWqDFK6MFclmN3od6ws3/uw==} + dependencies: + change-case: 5.4.0 + sponge-case: 2.0.2 + swap-case: 3.0.2 + title-case: 3.0.3 + dev: false + /change-case@4.1.2: resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} dependencies: @@ -2669,6 +2681,14 @@ packages: tslib: 2.6.2 dev: false + /change-case@5.0.2: + resolution: {integrity: sha512-tH6YZXViaeC2/Mnt8m4gSmbZfNorC2rhwCX2bXw8SYZWr8ljCPB7iA+1TLG9t7yroWBFauc63LlOZ1gucMVCWw==} + dev: false + + /change-case@5.4.0: + resolution: {integrity: sha512-11YRFf0f4pI+ROHUfq64WivyrcNSrZjdDt2qgVxvAObtj/Pwnu5uAKObHRbN9uAhaDFkvkqcKVEl8Dxnmx+N7w==} + dev: false + /char-regex@1.0.2: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} @@ -7419,6 +7439,10 @@ packages: extend-shallow: 3.0.2 dev: false + /sponge-case@2.0.2: + resolution: {integrity: sha512-LBnE+y0zs+ajPFa0Fn/wGhCqigua+AxYf4MZFO3l83e/rAEdtTxiXf/0u6+9VzLClVEHrow9Vpj5FycAtaHNcA==} + dev: false + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false @@ -7619,6 +7643,10 @@ packages: engines: {node: '>= 0.4'} dev: false + /swap-case@3.0.2: + resolution: {integrity: sha512-1tJUDXK5JZTVg04yDTMQnz1c9KFoTGQQo4QZuNbj5olv0ahyQK0R+OIU0KsbjmUhul+wg5iJFGfVRtilC5/GtQ==} + dev: false + /synckit@0.8.5: resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} engines: {node: ^14.18.0 || >=16.0.0} @@ -7740,6 +7768,12 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: false + /title-case@3.0.3: + resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==} + dependencies: + tslib: 2.6.2 + dev: false + /titleize@3.0.0: resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} engines: {node: '>=12'} @@ -9317,7 +9351,7 @@ packages: dev: false file:projects/openapi-to-typespec.tgz(jest@29.7.0): - resolution: {integrity: sha512-RqW7Hnn2Gm4Ytv2iUSt/wcaMZNUG15OZhayym0nAWp4BqpvjnV6UzruHlBu9pth0oZVC0uPK0dqIYZ/rDcLJ6g==, tarball: file:projects/openapi-to-typespec.tgz} + resolution: {integrity: sha512-zAj7zkO6vCcOuJPYLE8z93z4EqthmE0ByOjCnhOSutRmbgrMC357Rocf0KoOefoFJcA+IqIy3kIHBRPj/F7PVw==, tarball: file:projects/openapi-to-typespec.tgz} id: file:projects/openapi-to-typespec.tgz name: '@rush-temp/openapi-to-typespec' version: 0.0.0 @@ -9341,6 +9375,8 @@ packages: '@typespec/rest': 0.51.0(@typespec/compiler@0.51.0)(@typespec/http@0.51.0) '@typespec/versioning': 0.51.0(@typespec/compiler@0.51.0) chalk: 4.1.2 + change-case: 5.0.2 + change-case-all: 2.1.0 eslint: 8.53.0 eslint-plugin-import: 2.29.0(eslint@8.53.0) eslint-plugin-jest: 27.6.0(@typescript-eslint/eslint-plugin@6.11.0)(eslint@8.53.0)(jest@29.7.0)(typescript@5.2.2) diff --git a/packages/extensions/openapi-to-typespec/convert.ps1 b/packages/extensions/openapi-to-typespec/convert.ps1 index 094c5ad3b0..49824a8c79 100644 --- a/packages/extensions/openapi-to-typespec/convert.ps1 +++ b/packages/extensions/openapi-to-typespec/convert.ps1 @@ -22,13 +22,13 @@ param( $csharpCodegen = "https://aka.ms/azsdk/openapi-to-typespec-csharp", [string] # Specified the converter codegen, default to https://aka.ms/azsdk/openapi-to-typespec. - $converterCodegen = "" + $converterCodegen = "." ) function GenerateMetadata () { Write-Host "##Generating metadata with csharp codegen in $outputFolder with $csharpCodegen" - $cmd = "autorest --csharp --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" + $cmd = "autorest --csharp --isAzureSpec --isArm --max-memory-size=8192 --use=`"$csharpCodegen`" --output-folder=$outputFolder --mgmt-debug.only-generate-metadata --azure-arm --skip-csproj $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } @@ -42,7 +42,7 @@ function GenerateMetadata () function DoConvert () { Write-Host "##Converting from swagger to tsp with in $outputFolder with $converterCodegen" - $cmd = "autorest --openapi-to-typespec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder --src-path=tsp-output $swaggerConfigFile" + $cmd = "autorest --openapi-to-typespec --isAzureSpec --isArm --use=`"$converterCodegen`" --output-folder=$outputFolder --src-path=tsp-output $swaggerConfigFile" Write-Host "$cmd" Invoke-Expression $cmd if ($LASTEXITCODE) { exit $LASTEXITCODE } diff --git a/packages/extensions/openapi-to-typespec/package.json b/packages/extensions/openapi-to-typespec/package.json index 7ee8a35002..76bff5fbbf 100644 --- a/packages/extensions/openapi-to-typespec/package.json +++ b/packages/extensions/openapi-to-typespec/package.json @@ -53,7 +53,8 @@ "@typespec/openapi3": "^0.50.0", "prettier": "~3.1.0", "lodash": "~4.17.20", - "pluralize": "^8.0.0" + "pluralize": "^8.0.0", + "change-case-all": "~2.1.0" }, "devDependencies": { "autorest": "~3.7.1", diff --git a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts index 8879cff456..ecb48369f6 100644 --- a/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/emiters/emit-arm-resources.ts @@ -1,6 +1,6 @@ import { join } from "path"; import { getSession } from "../autorest-session"; -import { generateArmResource } from "../generate/generate-arm-resource"; +import { generateArmResource, generateArmResourceExamples } from "../generate/generate-arm-resource"; import { TypespecProgram, TspArmResource } from "../interfaces"; import { formatTypespecFile } from "../utils/format"; import { getNamespace } from "../utils/namespace"; @@ -8,6 +8,7 @@ import { getNamespace } from "../utils/namespace"; export async function emitArmResources(program: TypespecProgram, basePath: string) { // Create a file per resource const session = getSession(); + const { serviceInformation } = program; for (const armResource of program.models.armResources) { const { modules, namespaces } = getResourcesImports(program, armResource); const filePath = join(basePath, `${armResource.name}.tsp`); @@ -21,6 +22,18 @@ export async function emitArmResources(program: TypespecProgram, basePath: strin generatedResource, ].join("\n"); session.writeFile({ filename: filePath, content: await formatTypespecFile(content, filePath) }); + // generate examples for each operation + const examples = generateArmResourceExamples(armResource); + for (const [filename, content] of Object.entries(examples)) { + if (serviceInformation.versions) { + session.writeFile({ + filename: join(basePath, "examples", serviceInformation.versions[0], `${filename}.json`), + content, + }); + } else { + session.writeFile({ filename: join(basePath, "examples", "unknown", `${filename}.json`), content }); + } + } } } @@ -29,6 +42,7 @@ export function getResourcesImports(_program: TypespecProgram, armResource: TspA modules: [ `import "@azure-tools/typespec-azure-core";`, `import "@azure-tools/typespec-azure-resource-manager";`, + `import "@typespec/openapi";`, `import "@typespec/rest";`, `import "./models.tsp";`, ], @@ -37,6 +51,7 @@ export function getResourcesImports(_program: TypespecProgram, armResource: TspA `using Azure.ResourceManager;`, `using Azure.ResourceManager.Foundations;`, `using TypeSpec.Http;`, + `using TypeSpec.OpenAPI;`, ], }; diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts index 4bb9e5ed30..41b23f3a11 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-arm-resource.ts @@ -1,5 +1,7 @@ -import { Dictionary } from "@azure-tools/openapi/v3"; -import { TypespecOperation, TspArmResource, TspArmResourceOperation } from "interfaces"; +import { Case } from "change-case-all"; +import { TypespecOperation, TspArmResource } from "interfaces"; +import _ from "lodash"; +import pluralize from "pluralize"; import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; @@ -41,48 +43,100 @@ export function generateArmResource(resource: TspArmResource): string { } function generateArmResourceOperation(resource: TspArmResource): string { - const groupedOperations: Dictionary<(TspArmResourceOperation | TypespecOperation)[]> = {}; + const formalOperationGroupName = pluralize(resource.name); + const definitions: string[] = []; + + definitions.push("@armResourceOperations"); + if (resource.name === formalOperationGroupName) { + definitions.push(`@projectedName("client", "${formalOperationGroupName}")`); + definitions.push(`interface ${formalOperationGroupName}OperationGroup {`); + } else { + definitions.push(`interface ${formalOperationGroupName} {`); + } + for (const operation of resource.resourceOperations) { - if (!groupedOperations[operation.operationGroupName]) { - groupedOperations[operation.operationGroupName] = []; + for (const fixme of operation.fixMe ?? []) { + definitions.push(fixme); + } + definitions.push(generateDocs(operation)); + const decorators = generateDecorators(operation.decorators); + decorators && definitions.push(decorators); + if ( + operation.operationId && + operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) + ) { + definitions.push(`@operationId("${operation.operationId}")`); + definitions.push(`#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility"`); + } + if (operation.kind === "ArmResourceExists") { + definitions.push(`op ${operation.name}(${operation.parameters.join(",")}): ${operation.responses.join("|")}`); + } else if (operation.templateParameters?.length) { + definitions.push( + `${operation.name} is ${operation.kind}<${(operation.templateParameters ?? []) + .map(replaceGeneratedResourceObject) + .join(",")}>`, + ); + } else { + definitions.push(`${operation.name} is ${operation.kind}`); } - groupedOperations[operation.operationGroupName].push(operation); + definitions.push(""); } for (const operation of resource.normalOperations) { - if (!groupedOperations[operation.operationGroupName!]) { - groupedOperations[operation.operationGroupName!] = []; + if ( + operation.operationId && + operation.operationId !== getGeneratedOperationId(formalOperationGroupName, operation.name) + ) { + definitions.push(`@operationId("${operation.operationId}")`); + definitions.push(`#suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility"`); } - groupedOperations[operation.operationGroupName!].push(operation); + definitions.push(generateOperation(operation as TypespecOperation)); + definitions.push(""); } - const definitions: string[] = []; - for (const [operationGroupName, operations] of Object.entries(groupedOperations)) { - definitions.push("@armResourceOperations"); - definitions.push(`interface ${operationGroupName} {`); - for (let operation of operations) { - if ((operation as TspArmResourceOperation).kind) { - operation = operation as TspArmResourceOperation; - for (const fixme of operation.fixMe ?? []) { - definitions.push(fixme); - } - definitions.push(generateDocs(operation)); - const decorators = generateDecorators(operation.decorators); - decorators && definitions.push(decorators); - if (operation.kind === "ArmResourceExists") { - definitions.push(`op ${operation.name}(${operation.parameters.join(",")}): ${operation.responses.join("|")}`); - } else { - definitions.push( - `${operation.name} is ${operation.kind}<${(operation.templateParameters ?? []) - .map(replaceGeneratedResourceObject) - .join(",")}>`, - ); - } - } else { - definitions.push(generateOperation(operation as TypespecOperation)); - } + definitions.push("}\n"); + + return definitions.join("\n"); +} + +export function generateArmResourceExamples(resource: TspArmResource): Record { + const formalOperationGroupName = pluralize(resource.name); + const examples: Record = {}; + for (const operation of resource.resourceOperations) { + generateExamples( + operation.examples ?? {}, + operation.operationId ?? getGeneratedOperationId(formalOperationGroupName, operation.name), + examples, + ); + } + for (const operation of resource.normalOperations) { + generateExamples( + operation.examples ?? {}, + operation.operationId ?? getGeneratedOperationId(formalOperationGroupName, operation.name), + examples, + ); + } + return examples; +} + +function generateExamples( + examples: Record>, + operationId: string, + generatedExamples: Record, +) { + const count = _.keys(examples).length; + for (const [title, example] of _.entries(examples)) { + if (!example.operationId) { + example.operationId = operationId; + example.title = title; + } + let filename = operationId; + if (count > 1) { + filename = `${filename}_${Case.pascal(title)}`; } - definitions.push("}\n"); + generatedExamples[filename] = JSON.stringify(example, null, 2); } +} - return definitions.join("\n"); +function getGeneratedOperationId(operationGroupName: string, operationName: string): string { + return `${Case.pascal(operationGroupName)}_${Case.pascal(operationName)}`; } diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts index bf0835572d..c959ea3d94 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-enums.ts @@ -18,11 +18,11 @@ export function generateEnums(typespecEnum: TypespecEnum) { enum ${typespecEnum.name} { ${typespecEnum.members .map((m) => { - const kv = `"${m.name}"` !== m.value ? `${m.name}: ${m.value}` : m.value; + const kv = `"${m.name}"` !== m.value ? `"${m.name}": ${m.value}` : m.value; return `${generateDocs(m)}${kv}`; }) .join(", ")} - }\n`; + }\n\n`; definitions.push(enumDefinition); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts index cf469decc4..f6c6a0f3c8 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-operations.ts @@ -1,11 +1,13 @@ import { TypespecOperation, TypespecOperationGroup, TypespecParameter } from "../interfaces"; +import { replaceGeneratedResourceObject } from "../transforms/transform-arm-resources"; import { generateDocs, generateSummary } from "../utils/docs"; import { generateParameter } from "./generate-parameter"; export function generateOperation(operation: TypespecOperation, operationGroup?: TypespecOperationGroup) { const doc = generateDocs(operation); const summary = generateSummary(operation); - const { verb, name, route, responses, parameters } = operation; + const { verb, name, route, parameters } = operation; + const responses = operation.responses.map(replaceGeneratedResourceObject); const params = generateParameters(parameters); const statements: string[] = []; summary && statements.push(summary); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts index f6af8acb3c..494c906ece 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-parameter.ts @@ -1,7 +1,7 @@ import { TypespecParameter } from "../interfaces"; import { generateDecorators } from "../utils/decorators"; import { generateDocs } from "../utils/docs"; -import { transformValue } from "../utils/values"; +import { transformDefaultValue } from "../utils/values"; export function generateParameter(parameter: TypespecParameter): string { const definitions: string[] = []; @@ -12,7 +12,7 @@ export function generateParameter(parameter: TypespecParameter): string { decorators && definitions.push(decorators); let defaultValue = ""; if (parameter.defaultValue) { - defaultValue = ` = ${transformValue(parameter.defaultValue)}`; + defaultValue = ` = ${transformDefaultValue(parameter.type, parameter.defaultValue)}`; } definitions.push(`"${parameter.name}"${parameter.isOptional ? "?" : ""}: ${parameter.type}${defaultValue}`); diff --git a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts index e1d190b15d..aef4cdb664 100644 --- a/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/generate/generate-service-information.ts @@ -3,6 +3,8 @@ import { getOptions } from "../options"; import { generateDocs } from "../utils/docs"; import { getNamespace } from "../utils/namespace"; +const VALID_VERSIONS = ["v3", "v4", "v5"]; + export function generateServiceInformation(program: TypespecProgram) { const { serviceInformation } = program; const definitions: string[] = []; @@ -15,14 +17,23 @@ export function generateServiceInformation(program: TypespecProgram) { title: "${serviceInformation.name}" })`); - if (serviceInformation.version) { + if (serviceInformation.versions) { definitions.push(`@versioned(Versions)`); } if (isArm && serviceInformation.armCommonTypeVersion) { - definitions.push( - `@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, - ); + if (VALID_VERSIONS.includes(serviceInformation.armCommonTypeVersion)) { + definitions.push( + `@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, + ); + } else { + definitions.push( + `// FIXME: Common type version ${serviceInformation.armCommonTypeVersion} is not supported for now.`, + ); + definitions.push( + `// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.${serviceInformation.armCommonTypeVersion})`, + ); + } } if (!isArm && serviceInformation.endpoint) { @@ -52,15 +63,18 @@ export function generateServiceInformation(program: TypespecProgram) { definitions.push(getNamespace(program)); - if (serviceInformation.version) { + if (serviceInformation.versions) { definitions.push(""); definitions.push(`@doc("The available API versions.")`); definitions.push(`enum Versions {`); - if (isArm) { - definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); - definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); + for (const version of serviceInformation.versions) { + if (isArm) { + definitions.push(`@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)`); + definitions.push(`@useDependency(Azure.Core.Versions.v1_0_Preview_1)`); + } + definitions.push(`@doc("The ${version} API version.")`); + definitions.push(`v${version.replaceAll("-", "_")}: "${version}",`); } - definitions.push(`v${serviceInformation.version.replaceAll("-", "_")}: "${serviceInformation.version}",`); definitions.push("}"); } diff --git a/packages/extensions/openapi-to-typespec/src/interfaces.ts b/packages/extensions/openapi-to-typespec/src/interfaces.ts index 94c4b1aa82..1d38316ada 100644 --- a/packages/extensions/openapi-to-typespec/src/interfaces.ts +++ b/packages/extensions/openapi-to-typespec/src/interfaces.ts @@ -39,6 +39,8 @@ export interface TypespecOperation extends WithDoc, WithSummary, WithFixMe { extensions: Extension[]; resource?: TypespecResource; operationGroupName?: string; + operationId?: string; + examples?: Record>; } export type ResourceKind = @@ -63,7 +65,7 @@ export interface TypespecResource { export interface ServiceInformation extends WithDoc { name: string; - version?: string; + versions?: string[]; endpoint?: string; endpointParameters?: EndpointParameter[]; produces?: string[]; @@ -173,7 +175,8 @@ export interface TspArmResourceOperationBase extends WithDoc, WithFixMe { name: string; templateParameters?: string[]; decorators?: TypespecDecorator[]; - operationGroupName: string; + operationId?: string; + examples?: Record>; } export type TspArmResourceOperation = @@ -198,7 +201,10 @@ export interface TspArmResourceNonListOperation extends TspArmResourceOperationB | "ArmResourceActionSync" | "ArmResourceActionNoContentSync" | "ArmResourceActionAsync" - | "ArmResourceActionNoResponseContentAsync"; + | "ArmResourceActionNoResponseContentAsync" + | "checkGlobalNameAvailability" + | "checkLocalNameAvailability" + | "checkNameAvailability"; } export interface TspArmResourceListOperation extends TspArmResourceOperationBase { diff --git a/packages/extensions/openapi-to-typespec/src/model.ts b/packages/extensions/openapi-to-typespec/src/model.ts index 69da0ed2cc..4ad53cb7d7 100644 --- a/packages/extensions/openapi-to-typespec/src/model.ts +++ b/packages/extensions/openapi-to-typespec/src/model.ts @@ -7,7 +7,7 @@ import { transformEnum } from "./transforms/transform-choices"; import { getTypespecType, transformObject } from "./transforms/transform-object"; import { transformOperationGroup } from "./transforms/transform-operations"; import { transformServiceInformation } from "./transforms/transform-service-information"; -import { ArmResourceSchema, filterResourceRelatedObjects, isResourceSchema } from "./utils/resource-discovery"; +import { ArmResourceSchema, filterArmModels, isResourceSchema } from "./utils/resource-discovery"; import { isChoiceSchema } from "./utils/schemas"; const models: Map = new Map(); @@ -36,7 +36,7 @@ export function transformDataType(schema: Schema, codeModel: CodeModel): Typespe return { name: getTypespecType(schema, codeModel), kind: "wildcard", - doc: schema.language.default.documentation, + doc: schema.language.default.description, }; } @@ -71,7 +71,7 @@ function transformModel(codeModel: CodeModel): TypespecProgram { serviceInformation, models: { enums: caldEnums, - objects: isArm ? filterResourceRelatedObjects(typespecObjects) : typespecObjects, + objects: isArm ? filterArmModels(codeModel, typespecObjects) : typespecObjects, armResources, }, operationGroups: typespecOperationGroups, diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts index ea6448b011..9c7eb7038f 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-arm-resources.ts @@ -1,14 +1,6 @@ -import { - CodeModel, - ObjectSchema, - Operation, - Parameter, - Response, - SchemaResponse, - SchemaType, -} from "@autorest/codemodel"; +import { Operation, Parameter, Response, SchemaResponse, SchemaType } from "@autorest/codemodel"; import _ from "lodash"; -import pluralize from "pluralize"; +import { singular } from "pluralize"; import { getSession } from "../autorest-session"; import { generateParameter } from "../generate/generate-parameter"; import { @@ -89,7 +81,7 @@ export function transformTspArmResource(schema: ArmResourceSchema): TspArmResour propertiesModelName = "{}"; } - const operations = getTspOperations(schema, propertiesModelName); + const operations = getTspOperations(schema); return { fixMe, @@ -191,10 +183,11 @@ function convertResourceReadOperation( doc: resourceMetadata.GetOperations[0].Description, // TODO: resource have duplicated CRUD operations kind: "ArmResourceRead", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters: baseParameters ? [resourceMetadata.SwaggerModelName, baseParameters] : [resourceMetadata.SwaggerModelName], + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -207,18 +200,36 @@ function convertResourceExistsOperation(resourceMetadata: ArmResource): TspArmRe doc: swaggerOperation.language.default.description, kind: "ArmResourceExists", name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : "exists", - operationGroupName: getOperationGroupName(swaggerOperation.operationId, resourceMetadata.Name), + operationId: swaggerOperation.operationId, parameters: [ `...ResourceInstanceParameters<${resourceMetadata.SwaggerModelName}, BaseParameters<${resourceMetadata.SwaggerModelName}>>`, ], responses: ["OkResponse", "ErrorResponse"], decorators: [{ name: "head" }], + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } return []; } +function getLROHeader(swaggerOperation: Operation): string | undefined { + if (!swaggerOperation.extensions?.["x-ms-long-running-operation"]) { + return undefined; + } + let lroHeader = undefined; + const finalStateVia = swaggerOperation.extensions?.["x-ms-long-running-operation-options"]?.["final-state-via"]; + if (finalStateVia === "azure-async-operation") { + lroHeader = "ArmAsyncOperationHeader"; + } else if (finalStateVia === "location") { + lroHeader = "ArmLroLocationHeader"; + // TODO: deal with final-state-schema + } else { + // TODO: not sure how to deal with original-uri and operation-location + } + return lroHeader; +} + function convertResourceCreateOrUpdateOperation( resourceMetadata: ArmResource, operations: Record, @@ -227,16 +238,26 @@ function convertResourceCreateOrUpdateOperation( const operation = resourceMetadata.CreateOperations[0]; const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); + const templateParameters = [resourceMetadata.SwaggerModelName]; + if (baseParameters) { + templateParameters.push(baseParameters); + } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } return [ { doc: operation.Description, kind: isLongRunning ? "ArmResourceCreateOrUpdateAsync" : "ArmResourceCreateOrReplaceSync", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), - templateParameters: baseParameters - ? [resourceMetadata.SwaggerModelName, baseParameters] - : [resourceMetadata.SwaggerModelName], + operationId: operation.OperationID, + templateParameters: templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -246,7 +267,6 @@ function convertResourceCreateOrUpdateOperation( function convertResourceUpdateOperation( resourceMetadata: ArmResource, operations: Record, - resourcePropertiesModelName: string, ): TspArmResourceOperation[] { if (resourceMetadata.UpdateOperations.length) { const operation = resourceMetadata.UpdateOperations[0]; @@ -256,42 +276,18 @@ function convertResourceUpdateOperation( ) { const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); const bodyParam = swaggerOperation.requests?.[0].parameters?.find((p) => p.protocol.http?.in === "body"); - const propertiesProperty = (bodyParam?.schema as ObjectSchema)?.properties?.find( - (p) => p.serializedName === "properties", - ); - const tagsProperty = (bodyParam?.schema as ObjectSchema)?.properties?.find((p) => p.serializedName === "tags"); const fixMe: string[] = []; - if (!bodyParam || (!propertiesProperty && !tagsProperty)) { + if (!bodyParam) { fixMe.push( "// FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property", ); } let kind; const templateParameters = [resourceMetadata.SwaggerModelName]; - if (propertiesProperty) { - kind = isLongRunning ? "ArmResourcePatchAsync" : "ArmResourcePatchSync"; - // TODO: if update properties are different from resource properties, we need to use a different model - templateParameters.push(resourcePropertiesModelName); - addGeneratedResourceObjectIfNotExits( - bodyParam?.schema.language.default.name ?? "", - `ResourceUpdateModel<${resourceMetadata.SwaggerModelName}>`, - ); - if (propertiesProperty.schema.language.default.name !== resourcePropertiesModelName) { - addGeneratedResourceObjectIfNotExits( - propertiesProperty.schema.language.default.name, - `ResourceUpdateModelProperties<${resourceMetadata.SwaggerModelName}, ${resourcePropertiesModelName}>`, - ); - } - } else if (tagsProperty) { - kind = isLongRunning ? "ArmTagsPatchAsync" : "ArmTagsPatchSync"; - // TODO: if update properties are different from tag properties, we need to use a different model - addGeneratedResourceObjectIfNotExits( - bodyParam?.schema.language.default.name ?? "", - `TagsUpdateModel<${resourceMetadata.SwaggerModelName}>`, - ); - } else if (bodyParam) { + if (bodyParam) { kind = isLongRunning ? "ArmCustomPatchAsync" : "ArmCustomPatchSync"; templateParameters.push(bodyParam.schema.language.default.name); } else { @@ -301,14 +297,21 @@ function convertResourceUpdateOperation( if (baseParameters) { templateParameters.push(baseParameters); } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } return [ { fixMe, doc: operation.Description, kind: kind as any, name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -324,9 +327,19 @@ function convertResourceDeleteOperation( const operation = resourceMetadata.DeleteOperations[0]; const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; const baseParameters = buildOperationBaseParameters(swaggerOperation, resourceMetadata); - + const templateParameters = [resourceMetadata.SwaggerModelName]; + if (baseParameters) { + templateParameters.push(baseParameters); + } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } return [ { doc: operation.Description, @@ -336,10 +349,9 @@ function convertResourceDeleteOperation( : "ArmResourceDeleteWithoutOkAsync" : "ArmResourceDeleteSync", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), - templateParameters: baseParameters - ? [resourceMetadata.SwaggerModelName, baseParameters] - : [resourceMetadata.SwaggerModelName], + operationId: operation.OperationID, + templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }, ]; } @@ -373,15 +385,15 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmResourceListByParent", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters: templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } - // operation under subscription + // list operation under subscription if (resourceMetadata.OperationsFromSubscriptionExtension.length) { for (const operation of resourceMetadata.OperationsFromSubscriptionExtension) { - // TODO: handle other kinds of operations if (operation.PagingMetadata) { const swaggerOperation = operations[operation.OperationID]; const okResponse = swaggerOperation?.responses?.filter( @@ -406,16 +418,18 @@ function convertResourceListOperations( doc: operation.Description, kind: "ArmResourceListAtScope", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } else { converted.push({ doc: operation.Description, kind: "ArmListBySubscription", name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters: [resourceMetadata.SwaggerModelName], + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } } @@ -439,10 +453,11 @@ function convertResourceListOperations( name: swaggerOperation.operationId ? getOperationName(swaggerOperation.operationId) : `listBy${resourceMetadata.Parents[0].replace(/Resource$/, "")}`, - operationGroupName: getOperationGroupName(swaggerOperation.operationId, resourceMetadata.Name), + operationId: swaggerOperation.operationId, templateParameters: baseParameters ? [resourceMetadata.SwaggerModelName, baseParameters] : [resourceMetadata.SwaggerModelName], + examples: swaggerOperation.extensions?.["x-ms-examples"], }); (swaggerOperation as OperationWithResourceOperationFlag).isResourceOperation = true; } @@ -462,6 +477,7 @@ function convertResourceActionOperations( if (operation.Method === "POST") { const swaggerOperation = operations[operation.OperationID]; const isLongRunning = swaggerOperation.extensions?.["x-ms-long-running-operation"] ?? false; + const lroHeader = getLROHeader(swaggerOperation); const okResponse = swaggerOperation?.responses?.filter( (o) => o.protocol.http?.statusCodes.includes("200"), )?.[0]; @@ -489,12 +505,45 @@ function convertResourceActionOperations( if (baseParameters) { templateParameters.push(baseParameters); } + if (lroHeader) { + if (!baseParameters) { + templateParameters.push(`BaseParameters<${resourceMetadata.SwaggerModelName}>`); + } + templateParameters.push(lroHeader); + } converted.push({ doc: operation.Description, kind: kind as any, name: getOperationName(operation.OperationID), - operationGroupName: getOperationGroupName(operation.OperationID, resourceMetadata.Name), + operationId: operation.OperationID, templateParameters, + examples: swaggerOperation.extensions?.["x-ms-examples"], + }); + } + } + } + + return converted; +} + +function convertCheckNameAvailabilityOperations( + resourceMetadata: ArmResource, + operations: Record, +): TspArmResourceOperation[] { + const converted: TspArmResourceOperation[] = []; + + // check name availability operation under subscription + if (resourceMetadata.OperationsFromSubscriptionExtension.length) { + for (const operation of resourceMetadata.OperationsFromSubscriptionExtension) { + if (operation.Path.includes("/checkNameAvailability")) { + const swaggerOperation = operations[operation.OperationID]; + + converted.push({ + doc: operation.Description, + kind: "checkGlobalNameAvailability", + name: getOperationName(operation.OperationID), + operationId: operation.OperationID, + examples: swaggerOperation.extensions?.["x-ms-examples"], }); } } @@ -515,7 +564,13 @@ function convertResourceOtherGetOperations( const swaggerOperation = operations[operation.OperationID]; if (swaggerOperation.requests && swaggerOperation.requests[0]) { const op = transformRequest(swaggerOperation.requests[0], swaggerOperation, getSession().model); - op.operationGroupName = getOperationGroupName(operation.OperationID, resourceMetadata.Name); + op.operationGroupName = getOperationGroupName(operation.OperationID); + op.operationId = operation.OperationID; + if (!op.fixMe) { + op.fixMe = []; + } + op.fixMe.push(`// FIXME: ${operation.OperationID} could not be converted to a resource operation`); + op.examples = swaggerOperation.extensions?.["x-ms-examples"]; converted.push(op); } } @@ -525,10 +580,7 @@ function convertResourceOtherGetOperations( return converted; } -function getTspOperations( - armSchema: ArmResourceSchema, - resourcePropertiesModelName: string, -): [TspArmResourceOperation[], TypespecOperation[]] { +function getTspOperations(armSchema: ArmResourceSchema): [TspArmResourceOperation[], TypespecOperation[]] { const resourceMetadata = armSchema.resourceMetadata; const operations = getResourceOperations(resourceMetadata); const tspOperations: TspArmResourceOperation[] = []; @@ -546,7 +598,7 @@ function getTspOperations( tspOperations.push(...convertResourceCreateOrUpdateOperation(resourceMetadata, operations)); // patch update operation could either be patch for resource/tag or custom patch - tspOperations.push(...convertResourceUpdateOperation(resourceMetadata, operations, resourcePropertiesModelName)); + tspOperations.push(...convertResourceUpdateOperation(resourceMetadata, operations)); // delete operation tspOperations.push(...convertResourceDeleteOperation(resourceMetadata, operations)); @@ -557,6 +609,9 @@ function getTspOperations( // action operation tspOperations.push(...convertResourceActionOperations(resourceMetadata, operations)); + // check name availability operation + tspOperations.push(...convertCheckNameAvailabilityOperations(resourceMetadata, operations)); + // other get operations normalOperations.push(...convertResourceOtherGetOperations(resourceMetadata, operations)); @@ -567,11 +622,11 @@ function getOperationName(name: string): string { return _.lowerFirst(_.last(name.split("_"))); } -function getOperationGroupName(name: string | undefined, resourceName: string): string { +function getOperationGroupName(name: string | undefined): string { if (name && name.includes("_")) { return _.first(name.split("_"))!; } else { - return pluralize(resourceName); + return ""; } } @@ -588,26 +643,29 @@ function buildOperationBodyRequest(operation: Operation, resource: ArmResource): function buildOperationBaseParameters(operation: Operation, resource: ArmResource): string | undefined { const codeModel = getSession().model; - const parameters: TypespecParameter[] = []; - const resourceBasicParameters = []; + const otherParameters: TypespecParameter[] = []; + const pathParameters = []; resource.GetOperations[0].Path.split("/").forEach((p) => { if (p.match(/^{.+}$/)) { - resourceBasicParameters.push(p.replace("{", "").replace("}", "")); + pathParameters.push(p.replace("{", "").replace("}", "")); } }); - resourceBasicParameters.push("api-version"); - resourceBasicParameters.push("$host"); + pathParameters.push("api-version"); + pathParameters.push("$host"); if (operation.parameters) { for (const parameter of operation.parameters) { - if (!resourceBasicParameters.includes(parameter.language.default.serializedName)) { - parameters.push(transformParameter(parameter, codeModel)); + if (resource.IsSingletonResource && parameter.schema.type === SchemaType.Constant) { + continue; + } + if (!pathParameters.includes(parameter.language.default.serializedName)) { + otherParameters.push(transformParameter(parameter, codeModel)); } } } - if (parameters.length) { + if (otherParameters.length) { const params: string[] = []; - for (const parameter of parameters) { + for (const parameter of otherParameters) { params.push(generateParameter(parameter)); } return `{ @@ -701,7 +759,11 @@ function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { parameter.decorators.push( { name: "key", - arguments: [schema.resourceMetadata.ResourceKey], + arguments: [ + schema.resourceMetadata.IsSingletonResource + ? singular(schema.resourceMetadata.ResourceKeySegment) + : schema.resourceMetadata.ResourceKey, + ], }, { name: "segment", @@ -709,6 +771,10 @@ function buildKeyProperty(schema: ArmResourceSchema): TypespecObjectProperty { }, ); + // remove @path decorator for key parameter + // TODO: still under discussion with TSP team about this behavior, in order to keep generated swagger good, comment out for now + // parameter.decorators = parameter.decorators.filter((d) => d.name !== "path"); + // by convention the property itself needs to be called "name" parameter.name = "name"; diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts index 95ab5ea250..946f35556c 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-choices.ts @@ -12,7 +12,7 @@ export function transformEnum(schema: SealedChoiceSchema | ChoiceSchema, codeMod if (!typespecEnum) { typespecEnum = { decorators: getEnumDecorators(schema), - doc: schema.language.default.documentation, + doc: schema.language.default.description, kind: "enum", name: schema.language.default.name.replace(/-/g, "_"), members: schema.choices.map((choice) => transformChoiceMember(choice)), diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts index 0b0a85150e..0a8c2c9001 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-object.ts @@ -26,7 +26,7 @@ import { isSealedChoiceSchema, isStringSchema, } from "../utils/schemas"; -import { transformValue } from "../utils/values"; +import { getDefaultValue, transformValue } from "../utils/values"; const typespecTypes = new Map([ [SchemaType.Date, "plainDate"], @@ -122,7 +122,7 @@ export function transformObjectProperty(propertySchema: Property, codeModel: Cod isOptional: propertySchema.required !== true, type: visited.name, decorators: getPropertyDecorators(propertySchema), - defaultValue: propertySchema.schema.defaultValue, + defaultValue: getDefaultValue(propertySchema.schema), }; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts index 7ee2475c45..c7cb842160 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-operations.ts @@ -24,6 +24,7 @@ import { getPropertyDecorators } from "../utils/decorators"; import { getLogger } from "../utils/logger"; import { getLanguageMetadata } from "../utils/metadata"; import { isConstantSchema } from "../utils/schemas"; +import { getDefaultValue } from "../utils/values"; export function transformOperationGroup( { language, operations }: OperationGroup, @@ -176,7 +177,7 @@ export function transformParameter(parameter: Parameter, codeModel: CodeModel): location: transformParameterLocation(parameter), decorators: getPropertyDecorators(parameter), serializedName: parameter.language.default.serializedName ?? parameter.language.default.name, - defaultValue: parameter.schema.defaultValue, + defaultValue: getDefaultValue(parameter.schema), }; } diff --git a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts index 0189eb70aa..e9f7e17168 100644 --- a/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts +++ b/packages/extensions/openapi-to-typespec/src/transforms/transform-service-information.ts @@ -12,7 +12,7 @@ export function transformServiceInformation(model: CodeModel): ServiceInformatio doc: model.info.description ?? "// FIXME: (miissing-service-description) Add service description", endpoint: getFirstEndpoint(model), endpointParameters: transformEndpointParameters(model), - version: getApiVersion(model), + versions: getApiVersions(model), armCommonTypeVersion: isArm ? getArmCommonTypeVersion() : undefined, }; } @@ -28,19 +28,17 @@ export function transformEndpointParameters(model: CodeModel): EndpointParameter })); } -function getApiVersion(model: CodeModel): string | undefined { +function getApiVersions(model: CodeModel): string[] | undefined { if (!model.globalParameters || !model.globalParameters.length) { return undefined; } - const apiVersionParam = model.globalParameters - .filter( - (gp) => gp.implementation === ImplementationLocation.Client && gp.protocol.http?.in === ParameterLocation.Query, - ) - .find((param) => param.language.default.serializedName === "api-version"); + const apiVersionParams = (model.schemas.constants ?? []).filter((c) => + c.language.default.name.startsWith("ApiVersion"), + ); - if (apiVersionParam && isConstantSchema(apiVersionParam.schema)) { - return apiVersionParam.schema.value.value.toString(); + if (apiVersionParams.length) { + return apiVersionParams.map((c) => c.value.value); } return undefined; diff --git a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts index 72446dc125..91c1f82a31 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/decorators.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/decorators.ts @@ -216,8 +216,9 @@ export function getEnumDecorators(enumeration: SealedChoiceSchema | ChoiceSchema if (isSealedChoiceSchema(enumeration)) { decorators.push({ - name: "Azure.Core.fixed", + name: "fixed", module: "@azure-tools/typespec-azure-core", + namespace: "Azure.Core", }); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts b/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts index f49137bdd2..6fc19cf5a8 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/discriminator.ts @@ -10,7 +10,13 @@ export function getDiscriminator(schema: ObjectSchema): TypespecObjectProperty | if (!schema.discriminatorValue) { return undefined; } - const { serializedName: name, language } = getDiscriminatorProperty(schema); + const discriminator = getDiscriminatorProperty(schema); + if (!discriminator) { + const logger = getLogger("getDiscriminator"); + logger.warning(`No discriminator property found for ${schema.language.default.name}`); + return undefined; + } + const { serializedName: name, language } = discriminator; const type = `"${schema.discriminatorValue}"`; return { @@ -22,7 +28,7 @@ export function getDiscriminator(schema: ObjectSchema): TypespecObjectProperty | }; } -function getDiscriminatorProperty(schema: ObjectSchema): Property { +function getDiscriminatorProperty(schema: ObjectSchema): Property | undefined { const logger = getLogger("getDiscriminatorProperty"); logger.info(`Getting discriminator property for ${schema.language.default.name}`); @@ -32,7 +38,7 @@ function getDiscriminatorProperty(schema: ObjectSchema): Property { } if (!schema.parents?.immediate || schema.parents.immediate.length === 0) { - throw new Error("No discriminator property found"); + return; } for (const parent of schema.parents.immediate as ObjectSchema[]) { @@ -42,6 +48,4 @@ function getDiscriminatorProperty(schema: ObjectSchema): Property { return discriminator; } } - - throw new Error("No discriminator property found"); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/imports.ts b/packages/extensions/openapi-to-typespec/src/utils/imports.ts index 09efe43f57..eef7ada6a3 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/imports.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/imports.ts @@ -33,7 +33,8 @@ export function getModelsImports(program: TypespecProgram) { if (isArm) { modules.add(`import "@azure-tools/typespec-azure-resource-manager";`); - namespaces.add(`using Azure.ResourceManager;`); + namespaces.add("using Azure.ResourceManager;"); + namespaces.add("using Azure.ResourceManager.Foundations;"); } return { @@ -48,5 +49,12 @@ export function getRoutesImports(_program: TypespecProgram) { namespaces: [`using TypeSpec.Rest;`, `using TypeSpec.Http;`], }; + const { isArm } = getOptions(); + + if (isArm) { + imports.modules.push(`import "@azure-tools/typespec-azure-resource-manager";`); + imports.namespaces.push("using Azure.ResourceManager;"); + } + return imports; } diff --git a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts index 37d2aea83e..34d47e7b5a 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/model-generation.ts @@ -1,7 +1,7 @@ import { TypespecObjectProperty } from "../interfaces"; import { generateDecorators } from "./decorators"; import { generateDocs } from "./docs"; -import { transformValue } from "./values"; +import { transformDefaultValue } from "./values"; export function getModelPropertiesDeclarations(properties: TypespecObjectProperty[]): string[] { const definitions: string[] = []; @@ -13,7 +13,7 @@ export function getModelPropertiesDeclarations(properties: TypespecObjectPropert property.fixMe && property.fixMe.length && definitions.push(property.fixMe.join("\n")); let defaultValue = ""; if (property.defaultValue) { - defaultValue = ` = ${transformValue(property.defaultValue)}`; + defaultValue = ` = ${transformDefaultValue(property.type, property.defaultValue)}`; } definitions.push(`"${property.name}"${getOptionalOperator(property)}: ${property.type}${defaultValue};`); } diff --git a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts index 36558bf15b..01a72ba4ca 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/resource-discovery.ts @@ -1,6 +1,6 @@ import { readFileSync } from "fs"; import { join } from "path"; -import { ObjectSchema, Operation } from "@autorest/codemodel"; +import { CodeModel, ObjectSchema, Operation, SchemaResponse } from "@autorest/codemodel"; import { getSession } from "../autorest-session"; import { TypespecObject, TspArmResource } from "../interfaces"; import { isGeneratedResourceObject } from "../transforms/transform-arm-resources"; @@ -156,18 +156,10 @@ export function isResourceSchema(schema: ObjectSchema): schema is ArmResourceSch } const _ArmCoreTypes = [ - "Resource", - "ProxyResource", "TrackedResource", - "ErrorAdditionalInfo", - "ErrorDetail", - "ErrorResponse", - "Operation", - "OperationListResult", - "OperationDisplay", - "Origin", - "SystemData", - "Origin", + "ProxyResource", + "ExtensionResource", + "ResourceProvisioningState", "ManagedServiceIdentity", "ManagedSystemAssignedIdentity", "EntityTag", @@ -175,10 +167,34 @@ const _ArmCoreTypes = [ "ResourcePlan", "ResourceSku", "ManagedBy", + "OperationListResult", + "Origin", + "OperationDisplay", + "OperationStatusResult", + "ErrorDetail", + "ErrorAdditionalInfo", + "SystemData", + "ManagedIdentityProperties", + "ManagedSystemIdentityProperties", + "UserAssignedIdentity", + "Operation", + "ErrorResponse", ]; -export function filterResourceRelatedObjects(objects: TypespecObject[]): TypespecObject[] { - return objects.filter((o) => !_ArmCoreTypes.includes(o.name) && !isGeneratedResourceObject(o.name)); +export function filterArmModels(codeModel: CodeModel, objects: TypespecObject[]): TypespecObject[] { + const filtered = [..._ArmCoreTypes]; + for (const operationGroup of codeModel.operationGroups) { + for (const operation of operationGroup.operations) { + if (operation.requests?.[0].protocol?.http?.path.match(/^\/providers\/[^/]+\/operations$/)) { + const okResponse = operation.responses?.filter((o) => o.protocol.http?.statusCodes.includes("200"))?.[0]; + const objectName = (okResponse as SchemaResponse)?.schema?.language.default.name; + if (objectName) { + filtered.push(objectName); + } + } + } + } + return objects.filter((o) => !filtered.includes(o.name) && !isGeneratedResourceObject(o.name)); } export function isTspArmResource(schema: TypespecObject): schema is TspArmResource { diff --git a/packages/extensions/openapi-to-typespec/src/utils/values.ts b/packages/extensions/openapi-to-typespec/src/utils/values.ts index b942bd5c33..a08d9c122d 100644 --- a/packages/extensions/openapi-to-typespec/src/utils/values.ts +++ b/packages/extensions/openapi-to-typespec/src/utils/values.ts @@ -1,3 +1,6 @@ +import { Schema } from "@autorest/codemodel"; +import { isChoiceSchema } from "./schemas"; + export function transformValue(value: string | number | boolean) { if (typeof value === "string") { return `"${value}"`; @@ -5,3 +8,26 @@ export function transformValue(value: string | number | boolean) { return value; } + +export function transformDefaultValue(type: string, value: string | number | boolean) { + if (type === "string" || type === "int32" || type === "boolean") { + return transformValue(value); + } else { + return `${type}.${value}`; + } +} + +export function getDefaultValue(schema: Schema) { + if (schema.defaultValue === undefined) { + return undefined; + } + if (isChoiceSchema(schema)) { + for (const choice of schema.choices) { + if (schema.defaultValue === choice.value.toString()) { + return choice.language.default.name; + } + } + } else { + return schema.defaultValue; + } +} diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp index edbc82d4da..5ecdd63f5c 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/main.tsp @@ -27,5 +27,6 @@ namespace Azure.Language.Authoring; @doc("The available API versions.") enum Versions { + @doc("The 2022-05-01 API version.") v2022_05_01: "2022-05-01", } diff --git a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp index 008e08d46b..2ba09b48b7 100644 --- a/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/analyzeText/tsp-output/models.tsp @@ -28,6 +28,7 @@ own data. CustomEntityRecognition, } +@doc("Human-readable error code.") enum ErrorCode { InvalidRequest, InvalidArgument, @@ -49,6 +50,7 @@ enum ErrorCode { Warning, } +@doc("Human-readable error code.") enum InnerErrorCode { InvalidRequest, InvalidParameterValue, diff --git a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp index f688b34039..163fe77182 100644 --- a/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/anomalyDetector/tsp-output/models.tsp @@ -8,10 +8,15 @@ using Azure.Core; namespace AnomalyDetectorClient; +@doc("Anomaly Detector API version (for example, v1.0).") enum ApiVersion { `v1.1-preview.1`, } +@doc(""" +Define the impute method, can be one of auto, previous, linear, fixed, zero, +notFill. +""") enum ImputeMode { auto, previous, @@ -21,6 +26,7 @@ enum ImputeMode { notFill, } +@doc("The error code.") enum AnomalyDetectorErrorCodes { InvalidCustomInterval, BadArgument, @@ -35,6 +41,11 @@ enum AnomalyDetectorErrorCodes { InvalidImputeFixedValue, } +@doc(""" +An optional field, indicating how missing values will be filled. One of +Previous, Subsequent, Linear, Zero, Fixed, and NotFill. Cannot be set to +NotFill, when the alignMode is Outer. +""") enum FillNAMethod { Previous, Subsequent, @@ -43,7 +54,14 @@ enum FillNAMethod { Fixed, NotFill, } -@Azure.Core.fixed + +@doc(""" +Optional argument, can be one of yearly, monthly, weekly, daily, hourly, +minutely, secondly, microsecond or none. If granularity is not present, it will +be none by default. If granularity is none, the timestamp property in time +series point can be absent. +""") +@fixed enum TimeGranularity { yearly, monthly, @@ -55,24 +73,34 @@ enum TimeGranularity { microsecond, none, } -@Azure.Core.fixed + +@doc("Status of detection results. One of CREATED, RUNNING, READY, and FAILED.") +@fixed enum DetectionStatus { CREATED, RUNNING, READY, FAILED, } -@Azure.Core.fixed + +@fixed enum DataSchema { OneTable, MultiTable, } -@Azure.Core.fixed + +@doc(""" +An optional field, indicating how we align different variables to the same +time-range. Either Inner or Outer. +""") +@fixed enum AlignMode { Inner, Outer, } -@Azure.Core.fixed + +@doc("Model status. One of CREATED, RUNNING, READY, and FAILED.") +@fixed enum ModelStatus { CREATED, RUNNING, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp index 72877b9f11..76cbe90644 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataConnector.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("DataConnector Model.") @@ -28,10 +30,13 @@ model DataConnector is ProxyResource { interface DataConnectors { @doc("Get specific Data Connector resource by DataConnectorName.") get is ArmResourceRead; + @doc("Create or update Data Connector For MADMA resource.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Delete a Data Connectors with given dataConnector name.") delete is ArmResourceDeleteSync; + @doc("Lists the Data Connector Credentials for MADMA instance.") list is ArmResourceListByParent< DataConnector, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp index bfcd70862d..abd3f03cdb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgriculture.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("Data Manager For Agriculture ARM Resource.") @@ -25,19 +27,35 @@ model DataManagerForAgriculture } @armResourceOperations -interface DataManagerForAgricultureResources { +interface DataManagerForAgricultures { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get DataManagerForAgriculture resource.") + @operationId("DataManagerForAgricultureResources_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or update Data Manager For Agriculture resource.") + @operationId("DataManagerForAgricultureResources_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a Data Manager For Agriculture resource.") - update is ArmResourcePatchAsync< + @operationId("DataManagerForAgricultureResources_Update") + update is ArmCustomPatchAsync< DataManagerForAgriculture, - DataManagerForAgricultureProperties + DataManagerForAgricultureUpdateRequestModel, + BaseParameters, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a Data Manager For Agriculture resource.") + @operationId("DataManagerForAgricultureResources_Delete") delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the DataManagerForAgriculture instances for a resource group.") + @operationId("DataManagerForAgricultureResources_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent< DataManagerForAgriculture, { @@ -57,6 +75,9 @@ Minimum = 10, Maximum = 1000, Default value = 50. $skipToken?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the DataManagerForAgriculture instances for a subscription.") + @operationId("DataManagerForAgricultureResources_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp index 391df5ee82..c6ef7952a9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("DataManagerForAgriculture extension resource.") @@ -25,6 +27,7 @@ model DataManagerForAgricultureExtension interface DataManagerForAgricultureExtensions { @doc("Get Data Manager For Agriculture extension.") get is ArmResourceRead; + @doc("Get list of Data Manager For Agriculture extension.") list is ArmResourceListByParent< DataManagerForAgricultureExtension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp index de1bd79ad2..9a172339e3 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/DataManagerForAgricultureSolution.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("DataManagerForAgriculture solution resource.") @@ -22,10 +24,15 @@ model DataManagerForAgricultureSolution } @armResourceOperations -interface SolutionsDiscoverability { +interface DataManagerForAgricultureSolutions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Data Manager For Agriculture solution by id.") + @operationId("SolutionsDiscoverability_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get list of Data Manager For Agriculture solutions.") + @operationId("SolutionsDiscoverability_List") list is ArmResourceListByParent< DataManagerForAgricultureSolution, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp index 2c33c0e861..d9f39be6d2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Extension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("Extension resource.") @@ -26,10 +28,13 @@ model Extension is ProxyResource { interface Extensions { @doc("Get installed extension details by extension id.") get is ArmResourceRead; + @doc("Install or Update extension. Additional Api Properties are merged patch and if the extension is updated to a new version then the obsolete entries will be auto deleted from Additional Api Properties.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Uninstall extension.") delete is ArmResourceDeleteSync; + @doc("Get installed extensions details.") listByDataManagerForAgriculture is ArmResourceListByParent< Extension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp index f426df808b..89d643e266 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("The private endpoint connection resource.") @@ -25,10 +27,17 @@ model PrivateEndpointConnection interface PrivateEndpointConnections { @doc("Get Private endpoint connection object.") get is ArmResourceRead; + @doc("Approves or Rejects a Private endpoint connection request.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Delete Private endpoint connection request.") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + PrivateEndpointConnection, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Get list of Private endpoint connections.") listByResource is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp index 8b8908b8c1..9c9211fde2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/PrivateLinkResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("A private link resource.") @@ -24,6 +26,7 @@ model PrivateLinkResource is ProxyResource { interface PrivateLinkResources { @doc("Get Private link resource object.") get is ArmResourceRead; + @doc("Get list of Private link resources.") listByResource is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp index d74f15a5aa..bf0fb800b7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/Solution.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataManagerForAgriculture.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.AgFoodPlatform; @doc("Solution resource.") @@ -27,10 +29,13 @@ model Solution is ProxyResource { interface Solutions { @doc("Get installed Solution details by Solution id.") get is ArmResourceRead; + @doc("Install Or Update Solution.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Uninstall Solution.") delete is ArmResourceDeleteSync; + @doc("Get installed Solutions details.") list is ArmResourceListByParent< Solution, diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json new file mode 100644 index 0000000000..53cdeb0029 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_CreateOrUpdate.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "credentials": { + "apiKey": { + "keyName": "abcApiKey", + "keyVaultUri": "https://testKeyVault.vault.azure.net/", + "keyVersion": "239c0475c7d44f20b0fc27d3fe90a41d" + }, + "kind": "ApiKeyAuthCredentials" + } + } + }, + "dataConnectorName": "WeatherIBM", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + } + } + }, + "201": { + "body": { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "DataConnectors_CreateOrUpdate", + "title": "DataConnectors_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json new file mode 100644 index 0000000000..0c5d8e5f02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "SatelliteSentinelHub", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {}, + "400": { + "error": { + "code": "ConnectorConfigurationInvalid", + "message": "Connector name not supported. Supported connectors are 'SatelliteSentinelHub' and 'WeatherIBM'." + } + } + }, + "operationId": "DataConnectors_Delete", + "title": "DataConnectors_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json new file mode 100644 index 0000000000..83bdaeb1dd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "SatelliteSentinelHub", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "DataConnectors_Get", + "title": "DataConnectors_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json new file mode 100644 index 0000000000..c7d27435f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataConnectors_List.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataConnectorName": "WeatherIBM", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "SatelliteSentinelHub", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/SatelliteSentinelHub", + "properties": { + "credentials": { + "clientId": "string", + "clientSecret": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "OAuthClientCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + { + "name": "WeatherIBM", + "type": "Microsoft.AgFoodPlatform/farmBeats/dataConnectors", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/dataConnectors/WeatherIBM", + "properties": { + "credentials": { + "apiKey": { + "keyName": "string", + "keyVaultUri": "string", + "keyVersion": "string" + }, + "kind": "ApiKeyAuthCredentials" + } + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "DataConnectors_List", + "title": "DataConnectors_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json new file mode 100644 index 0000000000..ada406e640 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_Get.json @@ -0,0 +1,245 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureExtensionId": "DTN.ContentServices" + }, + "responses": { + "200": { + "body": { + "name": "DTN.ContentServices", + "type": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices", + "properties": { + "detailedInformation": [ + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "hours", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + } + ], + "extensionApiDocsLink": "https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/", + "extensionAuthLink": "https://www.dtn.com/dtn-content-integration/", + "extensionCategory": "Weather", + "farmBeatsExtensionId": "DTN.ContentServices", + "farmBeatsExtensionName": "DTN", + "farmBeatsExtensionVersion": "1.0", + "publisherId": "dtn", + "targetResourceType": "FarmBeats" + }, + "systemData": { + "createdAt": "2021-04-12T15:28:06Z", + "lastModifiedAt": "2021-04-12T15:30:01Z" + } + } + } + }, + "operationId": "DataManagerForAgricultureExtensions_Get", + "title": "DataManagerForAgricultureExtensions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json new file mode 100644 index 0000000000..366be7977e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureExtensions_List.json @@ -0,0 +1,250 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "DTN.ContentServices", + "type": "Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeatsExtensionDefinitions/DTN.ContentServices", + "properties": { + "detailedInformation": [ + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "hours", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyObservations", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetHourlyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "weatherCode", + "weatherDescription", + "feelsLike", + "visibilityWeatherCode", + "visibilityWeatherDescription", + "minutesOfSunshine" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "visibility", + "windChill", + "windSpeed", + "windDirection", + "windGust" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + }, + { + "apiInputParameters": [ + "stationId", + "lat", + "lon", + "days", + "units", + "precision", + "sector" + ], + "apiName": "GetDailyForecasts", + "customParameters": [ + "stationId", + "stationLatitude", + "stationLongitude", + "timeZone", + "sunrise", + "sunset", + "weatherCode", + "weatherDescription", + "maxTemperature", + "minTemperature", + "avgHeatIndex", + "maxHeatIndex", + "minHeatIndex", + "maxWindChill", + "minWindChill", + "maxFeelsLike", + "minFeelsLike", + "avgFeelsLike", + "maxWindSpeed", + "avgWetBulbGlobeTemp", + "maxWetBulbGlobeTemp", + "minWetBulbGlobeTemp", + "minutesOfSunshine", + "cornHeatUnit", + "evapotranspiration" + ], + "platformParameters": [ + "cloudCover", + "dewPoint", + "growingDegreeDay", + "precipitation", + "pressure", + "relativeHumidity", + "temperature", + "wetBulbTemperature", + "dateTime", + "windChill", + "windSpeed", + "windDirection" + ], + "unitsSupported": { + "key": "units", + "values": [ + "us", + "si" + ] + } + } + ], + "extensionApiDocsLink": "https://cs-docs.dtn.com/api/weather-observations-and-forecasts-rest-api/", + "extensionAuthLink": "https://www.dtn.com/dtn-content-integration/", + "extensionCategory": "Weather", + "farmBeatsExtensionId": "DTN.ContentServices", + "farmBeatsExtensionName": "DTN", + "farmBeatsExtensionVersion": "1.0", + "publisherId": "dtn", + "targetResourceType": "FarmBeats" + }, + "systemData": { + "createdAt": "2021-04-12T15:28:06Z", + "lastModifiedAt": "2021-04-12T15:30:01Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureExtensions_List", + "title": "DataManagerForAgricultureExtensions_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json new file mode 100644 index 0000000000..9bc813a591 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_CreateOrUpdate.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "location": "eastus2", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "examples-farmbeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "201": { + "body": { + "name": "examples-farmbeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Failed" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "DataManagerForAgricultureResources_CreateOrUpdate", + "title": "DataManagerForAgricultureResources_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json new file mode 100644 index 0000000000..3a533e483d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DataManagerForAgricultureResources_Delete", + "title": "DataManagerForAgricultureResources_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json new file mode 100644 index 0000000000..4e7b5dabc6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmBeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "DataManagerForAgricultureResources_Get", + "title": "DataManagerForAgricultureResources_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json new file mode 100644 index 0000000000..df0ca0fe96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListByResourceGroup.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureResources_ListByResourceGroup", + "title": "DataManagerForAgricultureResources_ListByResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json new file mode 100644 index 0000000000..2c1703447e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_ListBySubscription.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "DataManagerForAgricultureResources_ListBySubscription", + "title": "DataManagerForAgricultureResources_ListBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json new file mode 100644 index 0000000000..9828b76860 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/DataManagerForAgricultureResources_Update.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmBeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": { + "body": { + "name": "examples-farmBeatsResourceName", + "type": "Microsoft.AgFoodPlatform/farmBeats", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "location": "eastus2", + "properties": { + "instanceUri": "https://examples-farmbeatsResourceName.eastus2.farmbeats.azure.net", + "provisioningState": "Succeeded" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "headers": { + "location": "http://azure.async.operation/status" + } + } + }, + "operationId": "DataManagerForAgricultureResources_Update", + "title": "DataManagerForAgricultureResources_Update" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json new file mode 100644 index 0000000000..dceaa01cf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_CreateOrUpdate.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "apiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionVersion": "1.0" + }, + "dataManagerForAgricultureResourceName": "examples-dataManagerForAgricultureResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "201": { + "body": { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-dataManagerForAgricultureResourceName/extensions/provider.extension", + "properties": { + "additionalApiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:02.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "Extensions_CreateOrUpdate", + "title": "Extensions_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json new file mode 100644 index 0000000000..066518e750 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Extensions_Delete", + "title": "Extensions_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json new file mode 100644 index 0000000000..1465cc8516 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "extensionId": "provider.extension", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension", + "properties": { + "additionalApiProperties": { + "examples-api": { + "apiFreshnessTimeInMinutes": 3600 + } + }, + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "Extensions_Get", + "title": "Extensions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json new file mode 100644 index 0000000000..99eb18b851 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Extensions_ListByDataManagerForAgriculture.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "provider.extension", + "type": "Microsoft.AgFoodPlatform/farmBeats/extensions", + "eTag": "7200b954-0000-0700-0000-603cbbc40000", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/extensions/provider.extension", + "properties": { + "extensionApiDocsLink": "https://docs.provider.com/documentation/extension", + "extensionAuthLink": "https://www.provider.com/extension/", + "extensionCategory": "Weather", + "installedExtensionVersion": "1.0" + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-02-01T01:01:01.1075056Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Extensions_ListByDataManagerForAgriculture", + "title": "Extensions_ListByDataManagerForAgriculture" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json new file mode 100644 index 0000000000..665ce7316e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555", + "request": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "status": "Approved" + } + } + } + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "400": { + "body": { + "error": { + "code": "ModelValidationFailed", + "message": "Request input validation failed.", + "details": [ + { + "code": "ModelValidationFailed", + "message": "The Payload field is required.", + "target": "Payload" + }, + { + "code": "ModelValidationFailed", + "message": "Error converting value \"InvalidStatus\" to type 'PrivateEndpointState'. Path 'properties.privateLinkServiceConnectionState.status', line 1, position 624. Refer path description for more information.", + "target": "Payload.properties.privateLinkServiceConnectionState.status" + } + ] + } + } + } + }, + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "title": "PrivateEndpointConnections_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..7b06e2de35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "http://azure.async.operation/status" + } + }, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "PrivateEndpointConnections_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..cf7c434d07 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "404": { + "body": { + "error": { + "code": "PrivateEndpointConnectionNotFound", + "message": "Private endpoint connection resource 'privateEndpointConnectionName' for subscriptionId '11111111-2222-3333-4444-555555555555', resource group name 'examples-rg', resource type 'farmBeats' and resource name 'examples-farmbeatsResourceName' not found." + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "PrivateEndpointConnections_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json new file mode 100644 index 0000000000..d2db6ab443 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_ListByResource.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "privateEndpointConnectionName", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "privateEndpointConnectionName2", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateEndpointConnections", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName/privateEndpointConnections/privateEndpointConnectionName2", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName2" + }, + "privateLinkServiceConnectionState": { + "description": "Approved by johndoe@contoso.com", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_ListByResource", + "title": "PrivateEndpointConnections_ListByResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json new file mode 100644 index 0000000000..fb4a1b0bf1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_Get.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subResourceName": "farmbeats", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "farmbeats", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "properties": { + "groupId": "farmbeats", + "requiredMembers": [ + "farmbeats" + ], + "requiredZoneNames": [ + "privatelink.farmbeats.azure.net" + ] + } + } + }, + "404": { + "body": { + "error": { + "code": "ResourceNotFound", + "message": "Resource with subscriptionId '11111111-2222-3333-4444-555555555555', resource group 'examples-rg' and resourcename 'examples-farmbeatsResourceName' not found." + } + } + } + }, + "operationId": "PrivateLinkResources_Get", + "title": "PrivateLinkResources_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json new file mode 100644 index 0000000000..c1bcad35f3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_ListByResource.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "farmbeats", + "type": "Microsoft.AgFoodPlatform/farmBeats/privateLinkResources", + "id": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/examples-rg/providers/Microsoft.AgFoodPlatform/farmBeats/examples-farmbeatsResourceName", + "properties": { + "groupId": "farmbeats", + "requiredMembers": [ + "farmbeats" + ], + "requiredZoneNames": [ + "privatelink.farmbeats.azure.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_ListByResource", + "title": "PrivateLinkResources_ListByResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json new file mode 100644 index 0000000000..d0141b0dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_Get.json @@ -0,0 +1,776 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureSolutionId": "bayerAgPowered.gdu" + }, + "responses": { + "200": { + "body": { + "name": "bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "properties": { + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "actionIds": [ + "actionId1" + ], + "dataAccessScopes": [ + "Weather", + "Scenes" + ], + "marketplaceOfferDetails": { + "publisherId": "publisherId", + "saasOfferId": "saasOfferId" + }, + "openApiSpecsDictionary": { + "v1": { + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "basePath": "/", + "definitions": { + "Error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error containing list of errors.\r\nInnerError reference document.", + "additionalProperties": { + "type": "object" + }, + "properties": { + "code": { + "type": "string", + "description": "Specific error code than was provided by the\r\ncontaining error." + } + } + }, + "WeatherDataIngestionJob": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "operationId": "Weather_GetDataIngestionJobDetails", + "description": "Get weather ingestion job.", + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Id of the job.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "responses": { + "200": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + }, + "put": { + "operationId": "Weather_CreateDataIngestionJob", + "description": "Create a weather data ingestion job.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Job id supplied by user.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + }, + { + "name": "body", + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Job parameters supplied by user.", + "in": "body" + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "responses": { + "202": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + } + } + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "roleId": "role1", + "roleName": "roleName1", + "saaSApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + } + }, + "headers": {} + } + }, + "operationId": "SolutionsDiscoverability_Get", + "title": "SolutionsDiscoverability_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json new file mode 100644 index 0000000000..fcd5ae8e73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/SolutionsDiscoverability_List.json @@ -0,0 +1,778 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "bayerAgPowered.gdu", + "type": "Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions", + "id": "/providers/Microsoft.AgFoodPlatform/farmBeatsSolutionDefinitions/bayerAgPowered.gdu", + "properties": { + "accessFBApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "accessFBApplicationName": "solution provider 1", + "actionIds": [ + "actionId1" + ], + "dataAccessScopes": [ + "string" + ], + "marketplaceOfferDetails": { + "publisherId": "publisherId", + "saasOfferId": "saasOfferId" + }, + "openApiSpecsDictionary": { + "v1": { + "info": { + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "contact": { + "email": "apiteam@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "termsOfService": "http://swagger.io/terms/", + "title": "Swagger Petstore", + "version": "1.0.6" + }, + "basePath": "/", + "definitions": { + "Error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "InnerError": { + "type": "object", + "description": "Inner error containing list of errors.\r\nInnerError reference document.", + "additionalProperties": { + "type": "object" + }, + "properties": { + "code": { + "type": "string", + "description": "Specific error code than was provided by the\r\ncontaining error." + } + } + }, + "WeatherDataIngestionJob": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + } + }, + "externalDocs": { + "description": "Find out more about Swagger", + "url": "http://swagger.io" + }, + "host": "addon.azurewebsites.net", + "paths": { + "/v1/resources/{resourceId}": { + "get": { + "operationId": "Weather_GetDataIngestionJobDetails", + "description": "Get weather ingestion job.", + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Id of the job.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "responses": { + "200": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + }, + "put": { + "operationId": "Weather_CreateDataIngestionJob", + "description": "Create a weather data ingestion job.", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "name": "resourceId", + "type": "string", + "description": "Job id supplied by user.", + "in": "path", + "required": true + }, + { + "name": "api-version", + "type": "string", + "description": "The requested API version", + "default": "2021-07-31-preview", + "in": "query", + "required": true + }, + { + "name": "body", + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Job parameters supplied by user.", + "in": "body" + } + ], + "produces": [ + "application/json" + ], + "tags": [ + "Weather" + ], + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "responses": { + "202": { + "schema": { + "type": "object", + "description": "Schema of weather ingestion job.", + "additionalProperties": {}, + "properties": { + "name": { + "type": "string", + "description": "Name to identify resource.", + "maxLength": 100, + "minLength": 0 + }, + "description": { + "type": "string", + "description": "Textual description of the resource.", + "maxLength": 500, + "minLength": 0 + }, + "boundaryId": { + "type": "string", + "description": "The id of the boundary object for which weather data is being fetched." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "Job created at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "durationInSeconds": { + "type": "number", + "format": "double", + "description": "Duration of the job in seconds.", + "readOnly": true + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "Job end time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "extensionApiInput": { + "type": "object", + "description": "Extension api input dictionary which would be used to feed request query/body/parameter information.", + "additionalProperties": { + "type": "object" + } + }, + "extensionApiName": { + "type": "string", + "description": "Extension api name to which request is to be made.", + "maxLength": 100, + "minLength": 2 + }, + "extensionDataProviderApiKey": { + "type": "string", + "description": "Api key of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionDataProviderAppId": { + "type": "string", + "description": "App id of the weather data provider.", + "maxLength": 200, + "minLength": 2 + }, + "extensionId": { + "type": "string", + "description": "Id of the extension to be used for the providerInput. eg. DTN.ClearAg.", + "maxLength": 100, + "minLength": 2, + "pattern": "^[a-zA-Z]{3,50}[.][a-zA-Z]{3,100}$" + }, + "farmerId": { + "type": "string", + "description": "The id of the farmer object for which weather data is being fetched." + }, + "id": { + "type": "string", + "description": "Unique job id.", + "readOnly": true + }, + "lastActionDateTime": { + "type": "string", + "format": "date-time", + "description": "Job was last acted upon at dateTime. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "Status message to capture more details of the job.", + "readOnly": true + }, + "properties": { + "type": "object", + "description": "A collection of key value pairs that belongs to the resource.\r\nEach pair must not have a key greater than 50 characters\r\nand must not have a value greater than 150 characters.\r\nNote: A maximum of 25 key value pairs can be provided for a resource and only string,\r\nnumeral and datetime (yyyy-MM-ddTHH:mm:ssZ) values are supported.", + "additionalProperties": { + "type": "object" + }, + "example": { + "key1": "value1", + "key2": 123.45 + } + }, + "startTime": { + "type": "string", + "format": "date-time", + "description": "Job start time when available. Sample format: yyyy-MM-ddTHH:mm:ssZ.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Status of the job.\r\nPossible values: 'Waiting', 'Running', 'Succeeded', 'Failed', 'Cancelled'.", + "readOnly": true + } + }, + "required": [ + "boundaryId", + "extensionApiInput", + "extensionApiName", + "extensionId", + "farmerId" + ] + }, + "description": "Success" + }, + "default": { + "schema": { + "type": "object", + "description": "An error response from the Azure AgPlatform service.\r\nErrorResponse reference document..", + "properties": { + "error": { + "type": "object", + "description": "An error from the Azure AgPlatform service.", + "properties": { + "code": { + "type": "string", + "description": "Server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "Human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "Target of the error." + }, + "details": { + "type": "array", + "description": "Array of details about specific errors that led to this reported error." + } + } + }, + "traceId": { + "type": "string", + "description": "Unique trace Id." + } + } + }, + "description": "Error" + } + } + } + } + }, + "schemes": [ + "https" + ], + "swagger": "2.0" + } + }, + "partnerId": "abc", + "partnerTenantId": "556b0c04-d33e-48d0-9f6f-f893c8c77e00", + "roleId": "role1", + "roleName": "roleName1", + "saaSApplicationId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + }, + "systemData": { + "createdAt": "2022-07-25T10:15:15Z", + "lastModifiedAt": "2022-07-25T10:15:15Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "SolutionsDiscoverability_List", + "title": "SolutionsDiscoverability_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json new file mode 100644 index 0000000000..a056d6d7d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_CreateOrUpdate.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "termId": "termId" + } + }, + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "abc.partner", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Solutions_CreateOrUpdate", + "title": "Solutions_CreateOrUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json new file mode 100644 index 0000000000..d670792367 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "provider.solution", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Solutions_Delete", + "title": "Solutions_Delete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json new file mode 100644 index 0000000000..80d0f6de34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_Get.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "solutionId": "provider.solution", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Solutions_Get", + "title": "Solutions_Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json new file mode 100644 index 0000000000..2cba511691 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/examples/2023-06-01-preview/Solutions_List.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "dataManagerForAgricultureResourceName": "examples-farmbeatsResourceName", + "resourceGroupName": "examples-rg", + "subscriptionId": "11111111-2222-3333-4444-555555555555" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "string", + "type": "Microsoft.AgFoodPlatform/farmBeats/solutions", + "eTag": "19002383-0000-0700-0000-633572de0000", + "id": "/subscriptions/ff57165d-e71f-4a0e-8e9b-3cd461dc0f38/resourceGroups/bugbash-instances-westus2/providers/Microsoft.AgFoodPlatform/farmBeats/bb-df-wus2-1/solutions/string", + "properties": { + "marketplacePublisherId": "publisherId", + "offerId": "offerId", + "partnerId": "abc", + "planId": "planId", + "roleAssignmentId": "11111111-2222-3333-4444-555555555555", + "saasSubscriptionId": "123", + "saasSubscriptionName": "name", + "solutionId": "abc.intbugbashfour", + "termId": "termId" + }, + "systemData": { + "createdAt": "2022-09-29T10:26:29Z", + "createdBy": "billtest486451@live.com", + "createdByType": "User", + "lastModifiedAt": "2022-09-29T10:26:38Z", + "lastModifiedBy": "billtest486451@live.com", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Solutions_List", + "title": "Solutions_List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp index cfc34d8905..f34178833a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/main.tsp @@ -32,5 +32,6 @@ namespace Azure.ResourceManager.AgFoodPlatform; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-06-01-preview API version.") v2023_06_01_preview: "2023-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp index d9a870cbe5..f926f486cf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/models.tsp @@ -5,21 +5,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Azure.ResourceManager.AgFoodPlatform; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The reason why the given name is not available.") enum CheckNameAvailabilityReason { Invalid, AlreadyExists, } +@doc("Enum for different types of AuthCredentials supported.") enum AuthCredentialsKind { OAuthClientCredentials, ApiKeyAuthCredentials, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -27,6 +31,7 @@ enum CreatedByType { Key, } +@doc("Data Manager For Agriculture instance provisioning state.") enum ProvisioningState { Creating, Updating, @@ -36,17 +41,20 @@ enum ProvisioningState { Running, } +@doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") enum PublicNetworkAccess { Enabled, Disabled, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -54,12 +62,14 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } @@ -95,6 +105,25 @@ model DataConnectorProperties { @discriminator("kind") model AuthCredentials {} +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"") + @visibility("read") + id?: ResourceIdentifier; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + @doc("DataManagerForAgricultureExtension properties.") model DataManagerForAgricultureExtensionProperties { @doc("Target ResourceType of the Data Manager For Agriculture Extension.") @@ -279,6 +308,30 @@ model PrivateLinkServiceConnectionState { actionsRequired?: string; } +@doc("DataManagerForAgriculture update request.") +model DataManagerForAgricultureUpdateRequestModel { + @doc("Geo-location where the resource lives.") + location?: string; + + @doc("Identity for the resource.") + identity?: Identity; + + @doc("Data Manager For Agriculture ARM Resource properties.") + properties?: DataManagerForAgricultureUpdateProperties; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Data Manager For Agriculture ARM Resource properties.") +model DataManagerForAgricultureUpdateProperties { + @doc("Sensor integration request model.") + sensorIntegration?: SensorIntegration; + + @doc("Property to allow or block public traffic for an Azure Data Manager For Agriculture resource.") + publicNetworkAccess?: PublicNetworkAccess; +} + @doc(""" Arm async operation class. Ref: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations. diff --git a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp index eb025f3d9e..91430509ee 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-agrifood/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Azure.ResourceManager.AgFoodPlatform; diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md new file mode 100644 index 0000000000..70b119763f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/alertsmanagement.md @@ -0,0 +1,133 @@ +```yaml +library-name: AlertsManagement +namespace: Azure.ResourceManager.AlertsManagement +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/0077b4a8c5071d3ab33fd9f9ba013581c9a66b8f/specification/alertsmanagement/resource-manager/readme.md +skip-csproj: true +modelerfour: + flatten-payloads: false + +rename-mapping: + AlertModification.modifiedAt: modifiedOn|date-time + AlertProcessingRuleProperties.enabled: IsEnabled + AlertsSortByFields.startDateTime: StartOn + AlertsSortByFields.lastModifiedDateTime: LastModifiedOn + AlertsSummaryGroup.groupedby: GroupedBy + AlertsSummaryGroupItem.groupedby: GroupedBy + Essentials.startDateTime: StartOn|date-time + Essentials.lastModifiedUserName: lastModifiedBy + PatchObject.properties.enabled: IsEnabled + SmartGroup.properties.lastModifiedUserName: lastModifiedBy + SmartGroupModificationItem.modifiedAt: modifiedOn|date-time + Recurrence.startTime: startOn + Recurrence.endTime: endOn + Schedule.effectiveFrom: -|date-time + Schedule.effectiveUntil: -|date-time + TimeRange.1h: OneHour + TimeRange.1d: OneDay + TimeRange.7d: SevenDays + TimeRange.30d: ThirtyDays + AddActionGroups: AlertProcessingRuleAddGroupsAction + RemoveAllActionGroups: AlertProcessingRuleRemoveAllGroupsAction + AlertModificationEvent: ServiceAlertModificationEvent + AlertModificationItem: ServiceAlertModificationItemInfo + Severity: ServiceAlertSeverity + Identifier: RetrievedInformationIdentifier + TimeRange: TimeRangeFilter + DaysOfWeek: AlertsManagementDayOfWeek + MonitorService: MonitorServiceSourceForAlert + MonthlyRecurrence: AlertProcessingRuleMonthlyRecurrence + WeeklyRecurrence: AlertProcessingRuleWeeklyRecurrence + SortOrder: AlertsManagementQuerySortOrder + Action: AlertProcessingRuleAction + ActionType: AlertProcessingRuleActionType + Alert: ServiceAlert + AlertsList: ServiceAlertListResult + AlertState: ServiceAlertState + ActionStatus: ServiceAlertActionStatus + Essentials: ServiceAlertEssentials + SignalType: ServiceAlertSignalType + Condition: AlertProcessingRuleCondition + Field: AlertProcessingRuleField + Operator: AlertProcessingRuleOperator + SmartGroupModificationItem: SmartGroupModificationItemInfo + Schedule: AlertProcessingRuleSchedule + Recurrence: AlertProcessingRuleRecurrence + AlertsMetaData: ServiceAlertMetadata + AlertsMetaDataProperties: ServiceAlertMetadataProperties + AlertModification: ServiceAlertModification + AlertsSortByFields: ListServiceAlertsSortByField + AlertsSummary: ServiceAlertSummary + AlertsSummaryGroupByField: GetServiceAlertSummaryGroupByField + AlertsSummaryGroupItem: ServiceAlertSummaryGroupItemInfo + MetadataIdentifier: ServiceAlertMetadataIdentifier + AlertModificationProperties: ServiceAlertModificationProperties + AlertProperties: ServiceAlertProperties + AlertsSummaryGroup: ServiceAlertSummaryGroup + +format-by-name-rules: + "tenantId": "uuid" + "alertId": "uuid" + "smartGroupId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + "actionGroupIds": "arm-id" + +override-operation-name: + Alerts_MetaData: GetServiceAlertMetadata + Alerts_GetSummary: GetServiceAlertSummary + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + SCOM: Scom + +directive: + - from: SmartGroups.json + where: $.definitions + transform: > + $.errorResponse['x-ms-client-name'] = 'SmartGroupErrorResponse'; + $.errorResponseBody['x-ms-client-name'] = 'SmartGroupErrorResponseBody'; + $.smartGroupProperties.properties.smartGroupState['x-ms-enum']['name'] = 'SmartGroupState'; + - from: AlertProcessingRules.json + where: $.definitions + transform: > + $.errorResponse['x-ms-client-name'] = 'AlertProcessingRuleErrorResponse'; + $.errorResponseBody['x-ms-client-name'] = 'AlertProcessingRuleErrorResponseBody'; + $.Recurrence.properties.startTime['format'] = 'time'; + $.Recurrence.properties.endTime['format'] = 'time'; + - from: AlertsManagement.json + where: $.definitions + transform: > + $.errorResponse['x-ms-client-name'] = 'AlertsManagementErrorResponse'; + $.errorResponseBody['x-ms-client-name'] = 'AlertsManagementErrorResponseBody'; + - from: SmartGroups.json + where: $.parameters + transform: > + $.smartGroupId['format'] = 'uuid'; + - from: AlertsManagement.json + where: $.parameters + transform: > + $.alertId['format'] = 'uuid'; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json new file mode 100644 index 0000000000..47b898d324 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/resources.json @@ -0,0 +1,253 @@ +{ + "Resources": { + "AlertProcessingRule": { + "Name": "AlertProcessingRule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "GET", + "OperationID": "AlertProcessingRules_GetByName", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get an alert processing rule by name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "PUT", + "OperationID": "AlertProcessingRules_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update an alert processing rule." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "PATCH", + "OperationID": "AlertProcessingRules_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Enable, disable, or update tags for an alert processing rule." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}", + "Method": "DELETE", + "OperationID": "AlertProcessingRules_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete an alert processing rule." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules", + "Method": "GET", + "OperationID": "AlertProcessingRules_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all alert processing rules in a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetAlertProcessingRules", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules", + "Method": "GET", + "OperationID": "AlertProcessingRules_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all alert processing rules in a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "AlertProcessingRule", + "ResourceType": "Microsoft.AlertsManagement/actionRules", + "ResourceKey": "alertProcessingRuleName", + "ResourceKeySegment": "actionRules", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "ServiceAlert": { + "Name": "ServiceAlert", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}", + "Method": "GET", + "OperationID": "Alerts_GetById", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get information related to a specific alert" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts", + "Method": "GET", + "OperationID": "Alerts_GetAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GetAll", + "NextPageMethod": "GetAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. " + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetServiceAlertSummary", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary", + "Method": "GET", + "OperationID": "Alerts_GetSummary", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a summarized count of your alerts grouped by various parameters (e.g. grouping by \u0027Severity\u0027 returns the count of alerts for each severity)." + }, + { + "Name": "GetServiceAlertMetadata", + "Path": "/providers/Microsoft.AlertsManagement/alertsMetaData", + "Method": "GET", + "OperationID": "Alerts_MetaData", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List alerts meta data information based on value of identifier parameter." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ChangeState", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate", + "Method": "POST", + "OperationID": "Alerts_ChangeState", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Change the state of an alert." + }, + { + "Name": "GetHistory", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history", + "Method": "GET", + "OperationID": "Alerts_GetHistory", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed)." + } + ], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "Alert", + "ResourceType": "Microsoft.AlertsManagement/alerts", + "ResourceKey": "alertId", + "ResourceKeySegment": "alerts", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "SmartGroup": { + "Name": "SmartGroup", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}", + "Method": "GET", + "OperationID": "SmartGroups_GetById", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get information related to a specific Smart Group." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups", + "Method": "GET", + "OperationID": "SmartGroups_GetAll", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "GetAll", + "NextPageMethod": "GetAllNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all the Smart Groups within a specified subscription. " + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ChangeState", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState", + "Method": "POST", + "OperationID": "SmartGroups_ChangeState", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Change the state of a Smart Group." + }, + { + "Name": "GetHistory", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history", + "Method": "GET", + "OperationID": "SmartGroups_GetHistory", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) ." + } + ], + "Parents": ["SubscriptionResource"], + "SwaggerModelName": "SmartGroup", + "ResourceType": "Microsoft.AlertsManagement/smartGroups", + "ResourceKey": "smartGroupId", + "ResourceKeySegment": "smartGroups", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": true, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp new file mode 100644 index 0000000000..f09aa67b5b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/Alert.tsp @@ -0,0 +1,136 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.AlertsManagement; +@doc("An alert created in alert management service.") +@subscriptionResource +model Alert is ProxyResource { + @doc("Unique ID of an alert instance.") + @path + @key("alertId") + @segment("alerts") + name: string; +} + +@armResourceOperations +interface Alerts { + @doc("Get information related to a specific alert") + getById is ArmResourceRead; + + @doc("List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ") + getAll is ArmResourceListByParent< + Alert, + { + ...BaseParameters; + + @doc("Filter by target resource( which is full ARM ID) Default value is select all.") + @query("targetResource") + targetResource?: string; + + @doc("Filter by target resource type. Default value is select all.") + @query("targetResourceType") + targetResourceType?: string; + + @doc("Filter by target resource group name. Default value is select all.") + @query("targetResourceGroup") + targetResourceGroup?: string; + + @doc("Filter by monitor service which generates the alert instance. Default value is select all.") + @query("monitorService") + monitorService?: MonitorService; + + @doc("Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.") + @query("monitorCondition") + monitorCondition?: MonitorCondition; + + @doc("Filter by severity. Default value is select all.") + @query("severity") + severity?: Severity; + + @doc("Filter by state of the alert instance. Default value is to select all.") + @query("alertState") + alertState?: AlertState; + + @doc("Filter by specific alert rule. Default value is to select all.") + @query("alertRule") + alertRule?: string; + + @doc("Filter the alerts list by the Smart Group Id. Default value is none.") + @query("smartGroupId") + smartGroupId?: string; + + @doc("Include context which has contextual data specific to the monitor service. Default value is false'") + @query("includeContext") + includeContext?: boolean; + + @doc("Include egress config which would be used for displaying the content in portal. Default value is 'false'.") + @query("includeEgressConfig") + includeEgressConfig?: boolean; + + @doc("Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.") + @query("pageCount") + pageCount?: int32; + + @doc("Sort the query results by input field, Default value is 'lastModifiedDateTime'.") + @query("sortBy") + sortBy?: AlertsSortByFields; + + @doc("Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.") + @query("sortOrder") + sortOrder?: SortOrder; + + @doc("This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.") + @query("select") + select?: string; + + @doc("Filter by time range by below listed values. Default value is 1 day.") + @query("timeRange") + timeRange?: TimeRange; + + @doc("Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.") + @query("customTimeRange") + customTimeRange?: string; + } + >; + + @doc("Change the state of an alert.") + changeState is ArmResourceActionSync< + Alert, + string, + Alert, + { + ...BaseParameters; + + @doc("New state of the alert.") + @query("newState") + newState: AlertState; + } + >; + + @doc("Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).") + // FIXME: Alerts_GetHistory could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history") + @get + GetHistory is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("Unique ID of an alert instance.") + @path + alertId: string; + }, + AlertModification + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp new file mode 100644 index 0000000000..0ce05ed92c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/AlertProcessingRule.tsp @@ -0,0 +1,42 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.AlertsManagement; +@doc("Alert processing rule object containing target scopes, conditions and scheduling logic.") +model AlertProcessingRule is TrackedResource { + @doc("The name of the alert processing rule that needs to be fetched.") + @path + @key("alertProcessingRuleName") + @segment("actionRules") + name: string; +} + +@armResourceOperations +interface AlertProcessingRules { + @doc("Get an alert processing rule by name.") + getByName is ArmResourceRead; + + @doc("Create or update an alert processing rule.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + @doc("Enable, disable, or update tags for an alert processing rule.") + update is ArmCustomPatchSync; + + @doc("Delete an alert processing rule.") + delete is ArmResourceDeleteSync; + + @doc("List all alert processing rules in a resource group.") + listByResourceGroup is ArmResourceListByParent; + + @doc("List all alert processing rules in a subscription.") + listBySubscription is ArmListBySubscription; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp new file mode 100644 index 0000000000..d6bec57e3f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/SmartGroup.tsp @@ -0,0 +1,112 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.AlertsManagement; +@doc("Set of related alerts grouped together smartly by AMS.") +@subscriptionResource +model SmartGroup is ProxyResource { + @doc("Smart group unique id. ") + @path + @key("smartGroupId") + @segment("smartGroups") + name: string; +} + +@armResourceOperations +interface SmartGroups { + @doc("Get information related to a specific Smart Group.") + getById is ArmResourceRead; + + @doc("List all the Smart Groups within a specified subscription. ") + getAll is ArmResourceListByParent< + SmartGroup, + { + ...BaseParameters; + + @doc("Filter by target resource( which is full ARM ID) Default value is select all.") + @query("targetResource") + targetResource?: string; + + @doc("Filter by target resource group name. Default value is select all.") + @query("targetResourceGroup") + targetResourceGroup?: string; + + @doc("Filter by target resource type. Default value is select all.") + @query("targetResourceType") + targetResourceType?: string; + + @doc("Filter by monitor service which generates the alert instance. Default value is select all.") + @query("monitorService") + monitorService?: MonitorService; + + @doc("Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.") + @query("monitorCondition") + monitorCondition?: MonitorCondition; + + @doc("Filter by severity. Default value is select all.") + @query("severity") + severity?: Severity; + + @doc("Filter by state of the smart group. Default value is to select all.") + @query("smartGroupState") + smartGroupState?: AlertState; + + @doc("Filter by time range by below listed values. Default value is 1 day.") + @query("timeRange") + timeRange?: TimeRange; + + @doc("Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.") + @query("pageCount") + pageCount?: int32; + + @doc("Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.") + @query("sortBy") + sortBy?: SmartGroupsSortByFields; + + @doc("Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.") + @query("sortOrder") + sortOrder?: SortOrder; + } + >; + + @doc("Change the state of a Smart Group.") + changeState is ArmResourceActionSync< + SmartGroup, + void, + SmartGroup, + { + ...BaseParameters; + + @doc("New state of the alert.") + @query("newState") + newState: AlertState; + } + >; + + @doc("Get the history a smart group, which captures any Smart Group state changes (New/Acknowledged/Closed) .") + // FIXME: SmartGroups_GetHistory could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history") + @get + GetHistory is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("Smart group unique id. ") + @path + smartGroupId: string; + }, + SmartGroupModification + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json new file mode 100644 index 0000000000..1ac05a035a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsAnActionGroupToAllAlertsInASubscription.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Add ActionGroup1 to all alerts in the subscription", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "AddActionGroupToSubscription", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "AddActionGroupToSubscription", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", + "location": "Global", + "properties": { + "description": "Add ActionGroup1 to all alerts in the subscription", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2021-02-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "AddActionGroupToSubscription", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", + "location": "Global", + "properties": { + "description": "Add ActionGroup1 to all alerts in the subscription", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2021-02-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that adds an action group to all alerts in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json new file mode 100644 index 0000000000..776a83326d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatAddsTwoActionGroupsToAllSev0AndSev1AlertsInTwoResourceGroups.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "AddActionGroupsBySeverity", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "AddActionGroupsBySeverity", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", + "location": "Global", + "properties": { + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-13T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "AddActionGroupsBySeverity", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", + "location": "Global", + "properties": { + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-13T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that adds two action groups to all Sev0 and Sev1 alerts in two resource groups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json new file mode 100644 index 0000000000..de1721e393 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAlertsOnASpecificVmDuringAOneOffMaintenanceWindow_1800_2000AtASpecificDatePacificStandardTime.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsMaintenanceWindow", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsMaintenanceWindow", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsMaintenanceWindow", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ] + }, + "systemData": { + "createdAt": "2018-06-12T20:13:29Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsMaintenanceWindow", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsMaintenanceWindow", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ] + }, + "systemData": { + "createdAt": "2018-06-12T20:13:29Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups from alerts on a specific VM during a one-off maintenance window (1800-2000 at a specific date, Pacific Standard Time)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json new file mode 100644 index 0000000000..960e467d9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsInASubscriptionComingFromASpecificAlertRule.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsSpecificAlertRule", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsSpecificAlertRule", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsSpecificAlertRule", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsSpecificAlertRule", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsSpecificAlertRule", + "location": "Global", + "properties": { + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups from all alerts in a subscription coming from a specific alert rule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json new file mode 100644 index 0000000000..885de099fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsFromAllAlertsOnAnyVmInTwoResourceGroupsDuringARecurringMaintenanceWindow_2200_0400EverySatAndSunIndiaStandardTime.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "04:00:00", + "recurrenceType": "Weekly", + "startTime": "22:00:00" + } + ], + "timeZone": "India Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsRecurringMaintenance", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsRecurringMaintenance", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsRecurringMaintenance", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "04:00:00", + "recurrenceType": "Weekly", + "startTime": "22:00:00" + } + ], + "timeZone": "India Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsRecurringMaintenance", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsRecurringMaintenance", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "04:00:00", + "recurrenceType": "Weekly", + "startTime": "22:00:00" + } + ], + "timeZone": "India Standard Time" + }, + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups from all alerts on any VM in two resource groups during a recurring maintenance window (2200-0400 every Sat and Sun, India Standard Time)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json new file mode 100644 index 0000000000..e79939bea5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_CreateOrUpdate_CreateOrUpdateARuleThatRemovesAllActionGroupsOutsideBusinessHoursMonFri_09_00_17_00EasternStandardTime.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "alertProcessingRule": { + "location": "Global", + "properties": { + "description": "Remove all ActionGroups outside business hours", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "endTime": "09:00:00", + "recurrenceType": "Daily", + "startTime": "17:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "recurrenceType": "Weekly" + } + ], + "timeZone": "Eastern Standard Time" + }, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "tags": {} + }, + "alertProcessingRuleName": "RemoveActionGroupsOutsideBusinessHours", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "subId1" + }, + "responses": { + "200": { + "body": { + "name": "RemoveActionGroupsOutsideBusinessHours", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsOutsideBusinessHours", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups outside business hours", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "endTime": "09:00:00", + "recurrenceType": "Daily", + "startTime": "17:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "recurrenceType": "Weekly" + } + ], + "timeZone": "Eastern Standard Time" + }, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + }, + "201": { + "body": { + "name": "RemoveActionGroupsOutsideBusinessHours", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsOutsideBusinessHours", + "location": "Global", + "properties": { + "description": "Remove all ActionGroups outside business hours", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "enabled": true, + "schedule": { + "recurrences": [ + { + "endTime": "09:00:00", + "recurrenceType": "Daily", + "startTime": "17:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "recurrenceType": "Weekly" + } + ], + "timeZone": "Eastern Standard Time" + }, + "scopes": [ + "/subscriptions/subId1" + ] + }, + "systemData": { + "createdAt": "2018-06-11T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_CreateOrUpdate", + "title": "Create or update a rule that removes all action groups outside business hours (Mon-Fri 09:00-17:00, Eastern Standard Time)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json new file mode 100644 index 0000000000..b42923c565 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "alertProcessingRuleName": "DailySuppression", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AlertProcessingRules_Delete", + "title": "DeleteAlertProcessingRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json new file mode 100644 index 0000000000..5cb4374cc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_GetByName.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "alertProcessingRuleName": "DailySuppression", + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "name": "DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for daily and weekly scheduling", + "actions": [ + { + "actionGroupIds": [ + "actiongGroup1", + "actiongGroup2" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2018-01-10T22:05:09", + "effectiveUntil": "2018-12-10T22:05:09", + "recurrences": [ + { + "endTime": "14:00:00", + "recurrenceType": "Daily", + "startTime": "06:00:00" + }, + { + "daysOfWeek": [ + "Saturday", + "Sunday" + ], + "endTime": "20:00:00", + "recurrenceType": "Weekly", + "startTime": "10:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + } + }, + "operationId": "AlertProcessingRules_GetByName", + "title": "GetAlertProcessingRuleById" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json new file mode 100644 index 0000000000..ce4b49272a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListByResourceGroup.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "name": "DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for daily suppression", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2018-09-12T06:00:00", + "effectiveUntil": "2018-09-20T14:00:00", + "recurrences": [ + { + "endTime": "14:00:00", + "recurrenceType": "Daily", + "startTime": "06:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for sending email", + "actions": [ + { + "actionGroupIds": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.insights/actiongroups/testAG" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "Description", + "operator": "Contains", + "values": [ + "Percentage CPU greater than 80%", + "Metric alert on resource foo" + ] + }, + { + "field": "AlertContext", + "operator": "DoesNotContain", + "values": [ + "testresource", + "foo" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "AlertProcessingRules_ListByResourceGroup", + "title": "GetAlertProcessingRulesResourceGroupWide" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json new file mode 100644 index 0000000000..5e10417ad6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_ListBySubscription.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2021-08-08", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-08-08&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "name": "DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for daily suppression", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": true, + "schedule": { + "effectiveFrom": "2018-01-10T22:05:09", + "effectiveUntil": "2018-12-10T22:05:09", + "recurrences": [ + { + "endTime": "14:00:00", + "recurrenceType": "Daily", + "startTime": "06:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for adding action group", + "actions": [ + { + "actionGroupIds": [ + "actiongGroup1" + ], + "actionType": "AddActionGroups" + } + ], + "conditions": [ + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "Description", + "operator": "Contains", + "values": [ + "Percentage CPU greater than 80%", + "Metric alert on resource foo" + ] + } + ], + "enabled": true, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "AlertProcessingRules_ListBySubscription", + "title": "GetAlertProcessingRulesSubscriptionWide" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json new file mode 100644 index 0000000000..fd7ba3ccd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/AlertProcessingRules_Update.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "alertProcessingRuleName": "WeeklySuppression", + "alertProcessingRulePatch": { + "properties": { + "enabled": false + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "api-version": "2021-08-08", + "resourceGroupName": "alertscorrelationrg", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "name": "WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "location": "Global", + "properties": { + "description": "Alert processing rule on resource group for weekly suppression", + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "enabled": false, + "schedule": { + "effectiveFrom": "2018-12-10T22:05:09", + "effectiveUntil": "2018-12-05T22:05:09", + "recurrences": [ + { + "daysOfWeek": [ + "Tuesday", + "Friday" + ], + "endTime": "14:00:00", + "recurrenceType": "Weekly", + "startTime": "06:00:00" + } + ], + "timeZone": "Pacific Standard Time" + }, + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ] + }, + "systemData": { + "createdAt": "2018-06-12T22:05:09Z", + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "AlertProcessingRules_Update", + "title": "PatchAlertProcessingRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json new file mode 100644 index 0000000000..e56ba7816b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_ChangeState.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "api-version": "2019-05-05-preview", + "body": { + "comment": "Acknowledging alert" + }, + "newState": "Acknowledged", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://servisdfsdfappinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "Acknowledged", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", + "smartGroupingReason": "Occurred frequently with other alerts", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskappinsight", + "targetResourceType": "components" + } + } + } + } + }, + "operationId": "Alerts_ChangeState", + "title": "Resolve" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json new file mode 100644 index 0000000000..2e9edf3199 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetAll.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05-preview&timeRange=1d&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://servisdffsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "Acknowledged", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", + "smartGroupingReason": "Occurred frequently with other alerts", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskappinsight", + "targetResourceType": "components" + } + } + }, + { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://servicsdfsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "New", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "d1c49c89-ea95-4697-a299-c0f5ebac62f1", + "smartGroupingReason": "Alerts that frequently occur together have been grouped.", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/cind/providers/microsoft.operationalinsights/workspaces/servicedeskwcus", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskwcus", + "targetResourceType": "components" + } + } + } + ] + } + } + }, + "operationId": "Alerts_GetAll", + "title": "ListAlerts" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json new file mode 100644 index 0000000000..b4f1e0515d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetById.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "api-version": "2019-05-05-preview", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "properties": { + "context": {}, + "egressConfig": {}, + "essentials": { + "description": "description of the alert", + "actionStatus": { + "isSuppressed": false + }, + "alertRule": "https://sersdfsdfinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", + "alertState": "Acknowledged", + "lastModifiedDateTime": "2018-09-13T15:51:02Z", + "lastModifiedUserName": "System", + "monitorCondition": "Fired", + "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", + "monitorService": "Application Insights", + "severity": "Sev3", + "signalType": "Log", + "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", + "smartGroupingReason": "Occurred frequently with other alerts", + "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", + "startDateTime": "2018-09-13T15:51:02Z", + "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "targetResourceGroup": "servicedeskresourcegroup", + "targetResourceName": "servicedeskappinsight", + "targetResourceType": "components" + } + } + } + } + }, + "operationId": "Alerts_GetById", + "title": "GetById" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json new file mode 100644 index 0000000000..af3b3e2166 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/Alerts_GetHistory.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "api-version": "2019-05-05-preview", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "CPU Alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default", + "properties": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "modifications": [ + { + "description": "State changed from 'New' to 'Acknowledged'", + "comments": "Acknowledging alert", + "modificationEvent": "StateChange", + "modifiedAt": "2018-06-13T06:14:15.7378737Z", + "modifiedBy": "vikramm@microsoft.com", + "newValue": "Acknowledged", + "oldValue": "New" + }, + { + "description": "New Alert Object is created", + "comments": "", + "modificationEvent": "AlertCreated", + "modifiedAt": "2018-06-13T06:09:01Z", + "modifiedBy": "System", + "newValue": "", + "oldValue": "" + } + ] + } + } + } + }, + "operationId": "Alerts_GetHistory", + "title": "Resolve" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json new file mode 100644 index 0000000000..4859d65412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_ChangeState.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "body": { + "comments": "Acknowledging smart group" + }, + "newState": "Acknowledged", + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059", + "subscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "properties": { + "alertSeverities": [ + { + "name": "Sev3", + "count": 1942 + } + ], + "alertStates": [ + { + "name": "New", + "count": 1941 + }, + { + "name": "Acknowledged", + "count": 1 + } + ], + "alertsCount": 1942, + "lastModifiedDateTime": "2018-06-13T06:30:09Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 1942 + } + ], + "monitorServices": [ + { + "name": "Application Insights", + "count": 1942 + } + ], + "resourceGroups": [ + { + "name": "alertscorrelationrg", + "count": 1942 + } + ], + "resourceTypes": [ + { + "name": "components", + "count": 1942 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count": 1942 + } + ], + "severity": "Sev3", + "smartGroupState": "Acknowledged", + "startDateTime": "2018-06-06T12:35:09Z" + } + } + } + }, + "operationId": "SmartGroups_ChangeState", + "title": "changestate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json new file mode 100644 index 0000000000..1197536107 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetAll.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "subscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "properties": { + "alertSeverities": [ + { + "name": "Sev3", + "count": 1942 + } + ], + "alertStates": [ + { + "name": "New", + "count": 1941 + }, + { + "name": "Acknowledged", + "count": 1 + } + ], + "alertsCount": 1942, + "lastModifiedDateTime": "2018-06-13T06:30:09Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 1942 + } + ], + "monitorServices": [ + { + "name": "Application Insights", + "count": 1942 + } + ], + "resourceGroups": [ + { + "name": "alertscorrelationrg", + "count": 1942 + } + ], + "resourceTypes": [ + { + "name": "components", + "count": 1942 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count": 1942 + } + ], + "severity": "Sev3", + "smartGroupState": "New", + "startDateTime": "2018-06-06T12:35:09Z" + } + }, + { + "name": "CPU Alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/01114c7c-769f-4fd4-b6fa-ab77693b83cd", + "properties": { + "alertSeverities": [ + { + "name": "Sev0", + "count": 6984 + }, + { + "name": "Sev1", + "count": 6927 + } + ], + "alertStates": [ + { + "name": "New", + "count": 15358 + }, + { + "name": "Acknowledged", + "count": 12 + }, + { + "name": "Closed", + "count": 4 + } + ], + "alertsCount": 15374, + "lastModifiedDateTime": "2018-06-13T06:29:01Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 15374 + } + ], + "monitorServices": [ + { + "name": "Log Analytics", + "count": 13911 + } + ], + "resourceGroups": [ + { + "name": "mms-eus", + "count": 15374 + } + ], + "resourceTypes": [ + { + "name": "microsoft.operationalinsights/workspaces", + "count": 6912 + }, + { + "name": "workspaces", + "count": 8462 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/alertsint", + "count": 15374 + } + ], + "severity": "Sev0", + "smartGroupState": "Acknowledged", + "startDateTime": "2018-05-17T10:18:44.2020997Z" + } + } + ] + } + } + }, + "operationId": "SmartGroups_GetAll", + "title": "List" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json new file mode 100644 index 0000000000..b66d6510c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetById.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "smartGroupId": "603675da-9851-4b26-854a-49fc53d32715", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/smartGroups", + "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "properties": { + "alertSeverities": [ + { + "name": "Sev3", + "count": 1942 + } + ], + "alertStates": [ + { + "name": "New", + "count": 1941 + }, + { + "name": "Acknowledged", + "count": 1 + } + ], + "alertsCount": 1942, + "lastModifiedDateTime": "2018-06-13T06:30:09Z", + "lastModifiedUserName": "System", + "monitorConditions": [ + { + "name": "Fired", + "count": 1942 + } + ], + "monitorServices": [ + { + "name": "Application Insights", + "count": 1942 + } + ], + "resourceGroups": [ + { + "name": "alertscorrelationrg", + "count": 1942 + } + ], + "resourceTypes": [ + { + "name": "components", + "count": 1942 + } + ], + "resources": [ + { + "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count": 1942 + } + ], + "severity": "Sev3", + "smartGroupState": "New", + "startDateTime": "2018-06-06T12:35:09Z" + } + } + } + }, + "operationId": "SmartGroups_GetById", + "title": "Get" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json new file mode 100644 index 0000000000..982fb1c81f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/examples/2021-08-08/SmartGroups_GetHistory.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-05-05-preview", + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a" + }, + "responses": { + "200": { + "body": { + "name": "cpu alert", + "type": "Microsoft.AlertsManagement/alerts", + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059/history/default", + "properties": { + "modifications": [ + { + "description": "New Smart Group is created", + "comments": "", + "modificationEvent": "SmartGroupCreated", + "modifiedAt": "2018-06-06T12:35:09Z", + "modifiedBy": "System", + "newValue": "", + "oldValue": "" + } + ], + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059" + } + } + } + }, + "operationId": "SmartGroups_GetHistory", + "title": "Resolve" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp new file mode 100644 index 0000000000..5f922357ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/main.tsp @@ -0,0 +1,37 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./AlertProcessingRule.tsp"; +import "./Alert.tsp"; +import "./SmartGroup.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "AlertsManagementClient", +}) +@versioned(Versions) +// FIXME: Common type version v2 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +@doc("AlertsManagement Client") +namespace Azure.ResourceManager.AlertsManagement; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2021-08-08 API version.") + v2021_08_08: "2021-08-08", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2019-05-05-preview API version.") + v2019_05_05_preview: "2019-05-05-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp new file mode 100644 index 0000000000..5db9e03843 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/models.tsp @@ -0,0 +1,708 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.AlertsManagement; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("Field for a given condition.") +enum Field { + Severity, + MonitorService, + MonitorCondition, + SignalType, + TargetResourceType, + TargetResource, + TargetResourceGroup, + AlertRuleId, + AlertRuleName, + Description, + AlertContext, +} + +@doc("Operator for a given condition.") +enum Operator { + Equals, + NotEquals, + Contains, + DoesNotContain, +} + +@doc("Specifies when the recurrence should be applied.") +enum RecurrenceType { + Daily, + Weekly, + Monthly, +} + +@doc("Action that should be applied.") +enum ActionType { + AddActionGroups, + RemoveAllActionGroups, +} + +@doc("The type of identity that created the resource.") +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +enum Identifier { + MonitorServiceList, +} + +@doc("Identification of the information to be retrieved by API call") +enum MetadataIdentifier { + MonitorServiceList, +} + +enum MonitorService { + `Application Insights`, + `ActivityLog Administrative`, + `ActivityLog Security`, + `ActivityLog Recommendation`, + `ActivityLog Policy`, + `ActivityLog Autoscale`, + `Log Analytics`, + Nagios, + Platform, + SCOM, + ServiceHealth, + SmartDetector, + `VM Insights`, + Zabbix, +} + +enum MonitorCondition { + Fired, + Resolved, +} + +enum Severity { + Sev0, + Sev1, + Sev2, + Sev3, + Sev4, +} + +enum AlertState { + New, + Acknowledged, + Closed, +} + +enum AlertsSortByFields { + name, + severity, + alertState, + monitorCondition, + targetResource, + targetResourceName, + targetResourceGroup, + targetResourceType, + startDateTime, + lastModifiedDateTime, +} + +enum SortOrder { + asc, + desc, +} + +enum TimeRange { + `1h`, + `1d`, + `7d`, + `30d`, +} + +@doc("The type of signal the alert is based on, which could be metrics, logs or activity logs.") +enum SignalType { + Metric, + Log, + Unknown, +} + +enum AlertsSummaryGroupByFields { + severity, + alertState, + monitorCondition, + monitorService, + signalType, + alertRule, +} + +enum SmartGroupsSortByFields { + alertsCount, + state, + severity, + startDateTime, + lastModifiedDateTime, +} + +@doc("Smart group state") +enum SmartGroupState { + New, + Acknowledged, + Closed, +} + +@doc("Days of week.") +enum DaysOfWeek { + Sunday, + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday, +} + +@doc("Reason for the modification") +@fixed +enum AlertModificationEvent { + AlertCreated, + StateChange, + MonitorConditionChange, + SeverityChange, + ActionRuleTriggered, + ActionRuleSuppressed, + ActionsTriggered, + ActionsSuppressed, + ActionsFailed, +} + +@doc("Reason for the modification") +@fixed +enum SmartGroupModificationEvent { + SmartGroupCreated, + StateChange, + AlertAdded, + AlertRemoved, +} + +@doc("Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.") +model AlertProcessingRuleProperties { + @doc("Scopes on which alert processing rule will apply.") + scopes: string[]; + + @doc("Conditions on which alerts will be filtered.") + conditions?: Condition[]; + + @doc("Scheduling for alert processing rule.") + schedule?: Schedule; + + @doc("Actions to be applied.") + actions: Action[]; + + @doc("Description of alert processing rule.") + description?: string; + + @doc("Indicates if the given alert processing rule is enabled or disabled.") + enabled?: boolean; +} + +@doc("Condition to trigger an alert processing rule.") +model Condition { + @doc("Field for a given condition.") + field?: Field; + + @doc("Operator for a given condition.") + operator?: Operator; + + @doc("List of values to match for a given condition.") + values?: string[]; +} + +@doc("Scheduling configuration for a given alert processing rule.") +model Schedule { + @doc("Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix.") + @pattern("^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$") + effectiveFrom?: string; + + @doc("Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix.") + @pattern("^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$") + effectiveUntil?: string; + + @doc("Scheduling time zone.") + timeZone?: string; + + @doc("List of recurrences.") + recurrences?: Recurrence[]; +} + +@doc("Recurrence object.") +@discriminator("recurrenceType") +model Recurrence { + @doc("Start time for recurrence.") + startTime?: plainTime; + + @doc("End time for recurrence.") + endTime?: plainTime; +} + +@doc("Action to be applied.") +@discriminator("actionType") +model Action {} + +@doc("An azure managed resource object.") +model ManagedResource extends Resource { + @doc("Resource location") + @visibility("read", "create") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + location: string; + + @doc("Resource tags") + tags?: Record; +} + +@doc("An azure resource object") +model Resource { + @doc("Azure resource Id") + @visibility("read") + id?: string; + + @doc("Azure resource type") + @visibility("read") + type?: string; + + @doc("Azure resource name") + @visibility("read") + name?: string; +} + +@doc("An error response from the service.") +@error +model AlertProcessingRuleErrorResponse { + @doc("Details of error response.") + error?: AlertProcessingRuleErrorResponseBody; +} + +@doc("Details of error response.") +model AlertProcessingRuleErrorResponseBody { + @doc("Error code, intended to be consumed programmatically.") + code?: string; + + @doc("Description of the error, intended for display in user interface.") + message?: string; + + @doc("Target of the particular error, for example name of the property.") + target?: string; + + @doc("A list of additional details about the error.") + details?: AlertProcessingRuleErrorResponseBody[]; +} + +@doc("Data contract for patch.") +model PatchObject { + @doc("Properties supported by patch operation.") + properties?: PatchProperties; + + @doc("Tags to be updated.") + tags?: Record; +} + +@doc("Alert processing rule properties supported by patch.") +model PatchProperties { + @doc("Indicates if the given alert processing rule is enabled or disabled.") + enabled?: boolean; +} + +@doc("An error response from the service.") +@error +model AlertsManagementErrorResponse { + @doc("Details of error response.") + error?: AlertsManagementErrorResponseBody; +} + +@doc("Details of error response.") +model AlertsManagementErrorResponseBody { + @doc("Error code, intended to be consumed programmatically.") + code?: string; + + @doc("Description of the error, intended for display in user interface.") + message?: string; + + @doc("Target of the particular error, for example name of the property.") + target?: string; + + @doc("A list of additional details about the error.") + details?: AlertsManagementErrorResponseBody[]; +} + +@doc("alert meta data information.") +model AlertsMetaData { + @doc("alert meta data property bag") + properties?: AlertsMetaDataProperties; +} + +@doc("alert meta data property bag") +@discriminator("metadataIdentifier") +model AlertsMetaDataProperties {} + +@doc("Alert property bag") +model AlertProperties { + @doc("This object contains consistent fields across different monitor services.") + essentials?: Essentials; + + @doc("Information specific to the monitor service that gives more contextual details about the alert.") + @visibility("read") + context?: Record; + + @doc("Config which would be used for displaying the data in portal.") + @visibility("read") + egressConfig?: Record; +} + +@doc("This object contains consistent fields across different monitor services.") +model Essentials { + @doc("Severity of alert Sev0 being highest and Sev4 being lowest.") + @visibility("read") + severity?: Severity; + + @doc("The type of signal the alert is based on, which could be metrics, logs or activity logs.") + @visibility("read") + signalType?: SignalType; + + @doc("Alert object state, which can be modified by the user.") + @visibility("read") + alertState?: AlertState; + + @doc("Condition of the rule at the monitor service. It represents whether the underlying conditions have crossed the defined alert rule thresholds.") + @visibility("read") + monitorCondition?: MonitorCondition; + + @doc("Target ARM resource, on which alert got created.") + targetResource?: string; + + @doc("Name of the target ARM resource name, on which alert got created.") + targetResourceName?: string; + + @doc("Resource group of target ARM resource, on which alert got created.") + targetResourceGroup?: string; + + @doc("Resource type of target ARM resource, on which alert got created.") + targetResourceType?: string; + + @doc("Monitor service on which the rule(monitor) is set.") + @visibility("read") + monitorService?: MonitorService; + + @doc("Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.") + @visibility("read") + alertRule?: string; + + @doc("Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.") + @visibility("read") + sourceCreatedId?: string; + + @doc("Unique Id of the smart group") + @visibility("read") + smartGroupId?: string; + + @doc("Verbose reason describing the reason why this alert instance is added to a smart group") + @visibility("read") + smartGroupingReason?: string; + + @doc("Creation time(ISO-8601 format) of alert instance.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Last modification time(ISO-8601 format) of alert instance.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + monitorConditionResolvedDateTime?: utcDateTime; + + @doc("User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.") + @visibility("read") + lastModifiedUserName?: string; + + @doc("Action status") + actionStatus?: ActionStatus; + + @doc("Alert description.") + description?: string; +} + +@doc("Action status") +model ActionStatus { + @doc("Value indicating whether alert is suppressed.") + isSuppressed?: boolean; +} + +@doc("Alert Modification details") +model AlertModification extends Resource { + @doc("Properties of the alert modification item.") + properties?: AlertModificationProperties; +} + +@doc("Properties of the alert modification item.") +model AlertModificationProperties { + @doc("Unique Id of the alert for which the history is being retrieved") + @visibility("read") + alertId?: string; + + @doc("Modification details") + modifications?: AlertModificationItem[]; +} + +@doc("Alert modification item.") +model AlertModificationItem { + @doc("Reason for the modification") + modificationEvent?: AlertModificationEvent; + + @doc("Old value") + oldValue?: string; + + @doc("New value") + newValue?: string; + + @doc("Modified date and time") + modifiedAt?: string; + + @doc("Modified user details (Principal client name)") + modifiedBy?: string; + + @doc("Modification comments") + comments?: string; + + @doc("Description of the modification") + description?: string; +} + +@doc("Summary of alerts based on the input filters and 'groupby' parameters.") +model AlertsSummary extends Resource { + @doc("Group the result set.") + properties?: AlertsSummaryGroup; +} + +@doc("Group the result set.") +model AlertsSummaryGroup { + @doc("Total count of the result set.") + total?: int32; + + @doc("Total count of the smart groups.") + smartGroupsCount?: int32; + + @doc("Name of the field aggregated") + groupedby?: string; + + @doc("List of the items") + values?: AlertsSummaryGroupItem[]; +} + +@doc("Alerts summary group item") +model AlertsSummaryGroupItem { + @doc("Value of the aggregated field") + name?: string; + + @doc("Count of the aggregated field") + count?: int32; + + @doc("Name of the field aggregated") + groupedby?: string; + + @doc("List of the items") + values?: AlertsSummaryGroupItem[]; +} + +@doc("Properties of smart group.") +model SmartGroupProperties { + @doc("Total number of alerts in smart group") + alertsCount?: int32; + + @doc("Smart group state") + @visibility("read") + smartGroupState?: SmartGroupState; + + @doc("Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.") + @visibility("read") + severity?: Severity; + + @doc("Creation time of smart group. Date-Time in ISO-8601 format.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Last updated time of smart group. Date-Time in ISO-8601 format.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("Last modified by user name.") + @visibility("read") + lastModifiedUserName?: string; + + @doc("Summary of target resources in the smart group") + resources?: SmartGroupAggregatedProperty[]; + + @doc("Summary of target resource types in the smart group") + resourceTypes?: SmartGroupAggregatedProperty[]; + + @doc("Summary of target resource groups in the smart group") + resourceGroups?: SmartGroupAggregatedProperty[]; + + @doc("Summary of monitorServices in the smart group") + monitorServices?: SmartGroupAggregatedProperty[]; + + @doc("Summary of monitorConditions in the smart group") + monitorConditions?: SmartGroupAggregatedProperty[]; + + @doc("Summary of alertStates in the smart group") + alertStates?: SmartGroupAggregatedProperty[]; + + @doc("Summary of alertSeverities in the smart group") + alertSeverities?: SmartGroupAggregatedProperty[]; + + @doc("The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts.") + nextLink?: string; +} + +@doc("Aggregated property of each type") +model SmartGroupAggregatedProperty { + @doc("Name of the type.") + name?: string; + + @doc("Total number of items of type.") + count?: int32; +} + +@doc("An error response from the service.") +@error +model SmartGroupErrorResponse { + @doc("Details of error response.") + error?: SmartGroupErrorResponseBody; +} + +@doc("Details of error response.") +model SmartGroupErrorResponseBody { + @doc("Error code, intended to be consumed programmatically.") + code?: string; + + @doc("Description of the error, intended for display in user interface.") + message?: string; + + @doc("Target of the particular error, for example name of the property.") + target?: string; + + @doc("A list of additional details about the error.") + details?: SmartGroupErrorResponseBody[]; +} + +@doc("Alert Modification details") +model SmartGroupModification extends Resource { + @doc("Properties of the smartGroup modification item.") + properties?: SmartGroupModificationProperties; +} + +@doc("Properties of the smartGroup modification item.") +model SmartGroupModificationProperties { + @doc("Unique Id of the smartGroup for which the history is being retrieved") + @visibility("read") + smartGroupId?: string; + + @doc("Modification details") + modifications?: SmartGroupModificationItem[]; + + @doc("URL to fetch the next set of results.") + nextLink?: string; +} + +@doc("smartGroup modification item.") +model SmartGroupModificationItem { + @doc("Reason for the modification") + modificationEvent?: SmartGroupModificationEvent; + + @doc("Old value") + oldValue?: string; + + @doc("New value") + newValue?: string; + + @doc("Modified date and time") + modifiedAt?: string; + + @doc("Modified user details (Principal client name)") + modifiedBy?: string; + + @doc("Modification comments") + comments?: string; + + @doc("Description of the modification") + description?: string; +} + +@doc("Daily recurrence object.") +model DailyRecurrence extends Recurrence { + @doc("Specifies when the recurrence should be applied.") + recurrenceType: "Daily"; +} + +@doc("Weekly recurrence object.") +model WeeklyRecurrence extends Recurrence { + @doc("Specifies the values for weekly recurrence pattern.") + daysOfWeek: DaysOfWeek[]; + + @doc("Specifies when the recurrence should be applied.") + recurrenceType: "Weekly"; +} + +@doc("Monthly recurrence object.") +model MonthlyRecurrence extends Recurrence { + @doc("Specifies the values for monthly recurrence pattern.") + daysOfMonth: int32[]; + + @doc("Specifies when the recurrence should be applied.") + recurrenceType: "Monthly"; +} + +@doc("Add action groups to alert processing rule.") +model AddActionGroups extends Action { + @doc("List of action group Ids to add to alert processing rule.") + actionGroupIds: string[]; + + @doc("Action that should be applied.") + actionType: "AddActionGroups"; +} + +@doc("Indicates if all action groups should be removed.") +model RemoveAllActionGroups extends Action { + @doc("Action that should be applied.") + actionType: "RemoveAllActionGroups"; +} + +@doc("Monitor service details") +model MonitorServiceList extends AlertsMetaDataProperties { + @doc("Array of operations") + data: MonitorServiceDetails[]; + + @doc("Identification of the information to be retrieved by API call") + metadataIdentifier: "MonitorServiceList"; +} + +@doc("Details of a monitor service") +model MonitorServiceDetails { + @doc("Monitor service name") + name?: string; + + @doc("Monitor service display name") + displayName?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-alertsmanagement/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md new file mode 100644 index 0000000000..ef50c07cd0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/analysisservices.md @@ -0,0 +1,100 @@ +```yaml +library-name: Analysiservices +namespace: Azure.ResourceManager.Analysis +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/c2d2b523575031790b8672640ea762bdf9ad4964/specification/analysisservices/resource-manager/readme.md +tag: package-2017-08 +skip-csproj: true +modelerfour: + flatten-payloads: false + +rename-mapping: + State: AnalysisState + Status: AnalysisStatus + OperationStatus: AnalysisOperationStatus + AnalysisServicesServers.value: AnalysisResources + # SkuEnumerationForNewResourceResult.value: SKUs + Resource.sku: AnalysisSku + AnalysisServicesServer.properties.sku: AnalysisServerSku + ServerAdministrators.members: AsAdministratorIdentities + CheckServerNameAvailabilityResult.nameAvailable: IsNameAvailable + IPv4FirewallSettings.enablePowerBIService: IsPowerBIServiceEnabled + SkuDetailsForExistingResource: AnalysisExistingSku + SkuEnumerationForExistingResourceResult: ExistingResourceResultSkuEnumeration + SkuEnumerationForNewResourceResult: NewResourceResultSkuEnumeration + CheckServerNameAvailabilityContent: AnalysisServicesServerNameAvailabilityContent + # SkuEnumerationForExistingResourceResult.value: ExistingResources + AnalysisServicesServer.properties.ipV4FirewallSettings: IPv4FirewallSettings + AnalysisServicesServer.properties.querypoolConnectionMode: QueryPoolConnectionMode + CheckServerNameAvailabilityParameters: AnalysisServerNameAvailabilityContent + CheckServerNameAvailabilityResult: AnalysisServerNameAvailabilityResult + ConnectionMode: AnalysisConnectionMode + GatewayDetails: AnalysisGatewayDetails + IPv4FirewallRule: AnalysisIPv4FirewallRule + IPv4FirewallSettings: AnalysisIPv4FirewallSettings + ManagedMode: AnalysisManagedMode + ProvisioningState: AnalysisProvisioningState + ResourceSku: AnalysisResourceSku + AnalysisServicesServerUpdateParameters: AnalysisServerPatch + AnalysisServicesServers: AnalysisServers + AnalysisServicesServer: AnalysisServer + AnalysisServicesServerData: AnalysisServerData + AnalysisServicesServerResource: AnalysisServerResource + AnalysisServicesServerCollection: AnalysisServerCollection + GatewayListStatusLive: AnalysisGatewayStatus + Status.0: Zero + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +override-operation-name: + Servers_ListSkusForExisting: GetExistingSkus + Servers_CheckNameAvailability: CheckAnalysisServerNameAvailability + Servers_ListSkusForNew: GetEligibleSkus + +directive: + - remove-operation: Servers_ListOperationResults + - remove-operation: Servers_ListOperationStatuses + - from: analysisservices.json + where: $.definitions + transform: > + $.AnalysisServicesServerMutableProperties.properties.managedMode['x-ms-enum'] = { + "name": "ManagedMode", + "modelAsString": true + } + $.AnalysisServicesServerMutableProperties.properties.serverMonitorMode['x-ms-enum'] = { + "name": "ServerMonitorMode", + "modelAsString": true + } + - from: analysisservices.json + where: $.definitions.SkuDetailsForExistingResource.properties.resourceType + transform: $["x-ms-format"] = "resource-type" +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json new file mode 100644 index 0000000000..d9121ad0bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/resources.json @@ -0,0 +1,172 @@ +{ + "Resources": { + "AnalysisServer": { + "Name": "AnalysisServer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "GET", + "OperationID": "Servers_GetDetails", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets details about the specified Analysis Services server." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "PUT", + "OperationID": "Servers_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Provisions the specified Analysis Services server based on the configuration specified in the request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "PATCH", + "OperationID": "Servers_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates the current state of the specified Analysis Services server." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}", + "Method": "DELETE", + "OperationID": "Servers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes the specified Analysis Services server." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers", + "Method": "GET", + "OperationID": "Servers_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Gets all the Analysis Services servers for the given resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetAnalysisServers", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/servers", + "Method": "GET", + "OperationID": "Servers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists all the Analysis Services servers for the given subscription." + }, + { + "Name": "GetEligibleSkus", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/skus", + "Method": "GET", + "OperationID": "Servers_ListSkusForNew", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkusForNew", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists eligible SKUs for Analysis Services resource provider." + }, + { + "Name": "CheckAnalysisServerNameAvailability", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.AnalysisServices/locations/{location}/checkNameAvailability", + "Method": "POST", + "OperationID": "Servers_CheckNameAvailability", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Check the name availability in the target location." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Suspend", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/suspend", + "Method": "POST", + "OperationID": "Servers_Suspend", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Suspends operation of the specified Analysis Services server instance." + }, + { + "Name": "Resume", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/resume", + "Method": "POST", + "OperationID": "Servers_Resume", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Resumes operation of the specified Analysis Services server instance." + }, + { + "Name": "GetExistingSkus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus", + "Method": "GET", + "OperationID": "Servers_ListSkusForExisting", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkusForExisting", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Lists eligible SKUs for an Analysis Services resource." + }, + { + "Name": "GetGatewayStatus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/listGatewayStatus", + "Method": "POST", + "OperationID": "Servers_ListGatewayStatus", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Return the gateway status of the specified Analysis Services server instance." + }, + { + "Name": "DissociateGateway", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/dissociateGateway", + "Method": "POST", + "OperationID": "Servers_DissociateGateway", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Dissociates a Unified Gateway associated with the server." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "AnalysisServicesServer", + "ResourceType": "Microsoft.AnalysisServices/servers", + "ResourceKey": "serverName", + "ResourceKeySegment": "servers", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp new file mode 100644 index 0000000000..884cc56e0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/AnalysisServicesServer.tsp @@ -0,0 +1,128 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Analysis; +@doc("Represents an instance of an Analysis Services resource.") +model AnalysisServicesServer + is TrackedResource { + @doc("The name of the Analysis Services server. It must be a minimum of 3 characters, and a maximum of 63.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + @path + @key("serverName") + @segment("servers") + name: string; +} + +@armResourceOperations +interface AnalysisServicesServers { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets details about the specified Analysis Services server.") + @operationId("Servers_GetDetails") + getDetails is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Provisions the specified Analysis Services server based on the configuration specified in the request.") + @operationId("Servers_Create") + create is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates the current state of the specified Analysis Services server.") + @operationId("Servers_Update") + update is ArmCustomPatchAsync< + AnalysisServicesServer, + AnalysisServicesServerUpdateParameters + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes the specified Analysis Services server.") + @operationId("Servers_Delete") + delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets all the Analysis Services servers for the given resource group.") + @operationId("Servers_ListByResourceGroup") + listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists all the Analysis Services servers for the given subscription.") + @operationId("Servers_List") + list is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists eligible SKUs for Analysis Services resource provider.") + @operationId("Servers_ListSkusForNew") + listSkusForNew is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Suspends operation of the specified Analysis Services server instance.") + @operationId("Servers_Suspend") + suspend is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Resumes operation of the specified Analysis Services server instance.") + @operationId("Servers_Resume") + resume is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Return the gateway status of the specified Analysis Services server instance.") + @operationId("Servers_ListGatewayStatus") + listGatewayStatus is ArmResourceActionSync< + AnalysisServicesServer, + void, + GatewayListStatusLive + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Dissociates a Unified Gateway associated with the server.") + @operationId("Servers_DissociateGateway") + dissociateGateway is ArmResourceActionSync< + AnalysisServicesServer, + void, + void + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Check the name availability in the target location.") + @operationId("Servers_CheckNameAvailability") + checkNameAvailability is checkGlobalNameAvailability; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Servers_ListSkusForExisting") + @doc("Lists eligible SKUs for an Analysis Services resource.") + // FIXME: Servers_ListSkusForExisting could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AnalysisServices/servers/{serverName}/skus") + @get + ListSkusForExisting is Azure.Core.Foundations.Operation< + { + @doc("The name of the Azure Resource group of which a given Analysis Services server is part. This name must be at least 1 character in length, and no more than 90.") + @maxLength(90) + @minLength(1) + @pattern("^[-\\w\\._\\(\\)]+$") + @path + resourceGroupName: string; + + @doc("The name of the Analysis Services server. It must be at least 3 characters in length, and no more than 63.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + @path + serverName: string; + + @doc("A unique identifier for a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + }, + SkuEnumerationForExistingResourceResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json new file mode 100644 index 0000000000..2200bb3519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_CheckNameAvailability.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "location": "West US", + "serverParameters": { + "name": "azsdktest", + "type": "Microsoft.AnalysisServices/servers" + }, + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + }, + "headers": {} + } + }, + "operationId": "Servers_CheckNameAvailability", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json new file mode 100644 index 0000000000..2e420642a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Create.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "serverParameters": { + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + } + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + }, + "202": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Preparing", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Preparing" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + } + }, + "operationId": "Servers_Create", + "title": "Create a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json new file mode 100644 index 0000000000..cd433c7b69 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Delete.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "description": "OK.", + "headers": {} + }, + "202": { + "description": "Accepted.", + "headers": {} + }, + "204": { + "headers": {} + } + }, + "operationId": "Servers_Delete", + "title": "Delete a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json new file mode 100644 index 0000000000..aadd5492c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_DissociateGateway.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "headers": {} + } + }, + "operationId": "Servers_DissociateGateway", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json new file mode 100644 index 0000000000..15f0938232 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_GetDetails.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + } + }, + "operationId": "Servers_GetDetails", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json new file mode 100644 index 0000000000..710a9ecd16 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_List.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + { + "name": "azsdktest2", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG2/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S0", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_List", + "title": "List existing servers under the subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json new file mode 100644 index 0000000000..cbec3a228e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListByResourceGroup.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + { + "name": "azsdktest2", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S0", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_ListByResourceGroup", + "title": "List existing servers in the resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json new file mode 100644 index 0000000000..30ab89dff5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListGatewayStatus.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "status": 0 + }, + "headers": {} + } + }, + "operationId": "Servers_ListGatewayStatus", + "title": "Get details of a server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json new file mode 100644 index 0000000000..0b19718b94 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForExisting.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "B1", + "tier": "Basic" + } + }, + { + "sku": { + "name": "B2", + "tier": "Basic" + } + }, + { + "sku": { + "name": "S0", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S1", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S2", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S3", + "tier": "Standard" + } + }, + { + "sku": { + "name": "S4", + "tier": "Standard" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_ListSkusForExisting", + "title": "List eligible SKUs for an existing server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json new file mode 100644 index 0000000000..7b4c6fd08e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_ListSkusForNew.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "B1" + }, + { + "name": "B2" + }, + { + "name": "D1" + }, + { + "name": "S0" + }, + { + "name": "S1" + }, + { + "name": "S2" + }, + { + "name": "S3" + }, + { + "name": "S4" + } + ] + }, + "headers": {} + } + }, + "operationId": "Servers_ListSkusForNew", + "title": "List eligible SKUs for a new server" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json new file mode 100644 index 0000000000..ebdd026877 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Resume.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "description": "OK.", + "headers": {} + }, + "202": { + "description": "Accepted.", + "headers": {} + } + }, + "operationId": "Servers_Resume", + "title": "Resume a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json new file mode 100644 index 0000000000..caf0f5af1b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Suspend.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "description": "OK.", + "headers": {} + }, + "202": { + "description": "Accepted.", + "headers": {} + } + }, + "operationId": "Servers_Suspend", + "title": "Suspend a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json new file mode 100644 index 0000000000..213f749619 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/examples/2017-08-01/Servers_Update.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2017-08-01", + "resourceGroupName": "TestRG", + "serverName": "azsdktest", + "serverUpdateParameters": { + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + } + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "subscriptionId": "613192d7-503f-477a-9cfe-4efc3ee2bd60" + }, + "responses": { + "200": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + }, + "202": { + "body": { + "name": "azsdktest", + "id": "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.AnalysisServices/servers/azsdktest", + "location": "West US", + "properties": { + "asAdministrators": { + "members": [ + "azsdktest@microsoft.com", + "azsdktest2@microsoft.com" + ] + }, + "provisioningState": "Provisioning", + "serverFullName": "asazure://nightly1.asazure-int.windows.net/azsdktest", + "state": "Provisioning" + }, + "sku": { + "name": "S1", + "capacity": 1, + "tier": "Standard" + }, + "tags": { + "testKey": "testValue" + } + }, + "headers": {} + } + }, + "operationId": "Servers_Update", + "title": "Update a server." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp new file mode 100644 index 0000000000..5937a2bb30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/main.tsp @@ -0,0 +1,28 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./AnalysisServicesServer.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "AzureAnalysisServices", +}) +@versioned(Versions) +@doc("The Azure Analysis Services Web API provides a RESTful set of web services that enables users to create, retrieve, update, and delete Analysis Services servers") +namespace Azure.ResourceManager.Analysis; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2017-08-01 API version.") + v2017_08_01: "2017-08-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp new file mode 100644 index 0000000000..d028c80841 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/models.tsp @@ -0,0 +1,338 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.Analysis; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.") +enum State { + Deleting, + Succeeded, + Failed, + Paused, + Suspended, + Provisioning, + Updating, + Suspending, + Pausing, + Resuming, + Preparing, + Scaling, +} + +@doc("The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning.") +enum ProvisioningState { + Deleting, + Succeeded, + Failed, + Paused, + Suspended, + Provisioning, + Updating, + Suspending, + Pausing, + Resuming, + Preparing, + Scaling, +} + +@doc("The name of the Azure pricing tier to which the SKU applies.") +enum SkuTier { + Development, + Basic, + Standard, +} + +@doc("The managed mode of the server (0 = not managed, 1 = managed).") +enum ManagedMode { + `0`: 0, + `1`: 1, +} + +@doc("The server monitor mode for AS server") +enum ServerMonitorMode { + `0`: 0, + `1`: 1, +} + +@doc("How the read-write server's participation in the query pool is controlled.
It can have the following values:
  • readOnly - indicates that the read-write server is intended not to participate in query operations
  • all - indicates that the read-write server can participate in query operations
Specifying readOnly when capacity is 1 results in error.") +@fixed +enum ConnectionMode { + All, + ReadOnly, +} + +@doc("Properties of Analysis Services resource.") +model AnalysisServicesServerProperties + extends AnalysisServicesServerMutableProperties { + @doc("The current state of Analysis Services resource. The state is to indicate more states outside of resource provisioning.") + @visibility("read") + state?: State; + + @doc("The current deployment state of Analysis Services resource. The provisioningState is to indicate states for resource provisioning.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The full name of the Analysis Services resource.") + @visibility("read") + serverFullName?: string; + + @doc("The SKU of the Analysis Services resource.") + sku?: ResourceSku; +} + +@doc("An object that represents a set of mutable Analysis Services resource properties.") +model AnalysisServicesServerMutableProperties { + @doc("A collection of AS server administrators") + asAdministrators?: ServerAdministrators; + + @doc("The SAS container URI to the backup container.") + backupBlobContainerUri?: string; + + @doc("The gateway details configured for the AS server.") + gatewayDetails?: GatewayDetails; + + @doc("The firewall settings for the AS server.") + ipV4FirewallSettings?: IPv4FirewallSettings; + + @doc("How the read-write server's participation in the query pool is controlled.
It can have the following values:
  • readOnly - indicates that the read-write server is intended not to participate in query operations
  • all - indicates that the read-write server can participate in query operations
Specifying readOnly when capacity is 1 results in error.") + querypoolConnectionMode?: ConnectionMode; + + @doc("The managed mode of the server (0 = not managed, 1 = managed).") + managedMode?: ManagedMode; + + @doc("The server monitor mode for AS server") + serverMonitorMode?: ServerMonitorMode; +} + +@doc("An array of administrator user identities.") +model ServerAdministrators { + @doc("An array of administrator user identities.") + members?: string[]; +} + +@doc("The gateway details.") +model GatewayDetails { + @doc("Gateway resource to be associated with the server.") + gatewayResourceId?: string; + + @doc("Gateway object id from in the DMTS cluster for the gateway resource.") + @visibility("read") + gatewayObjectId?: string; + + @doc("Uri of the DMTS cluster.") + @visibility("read") + dmtsClusterUri?: string; +} + +@doc("An array of firewall rules.") +model IPv4FirewallSettings { + @doc("An array of firewall rules.") + firewallRules?: IPv4FirewallRule[]; + + @doc("The indicator of enabling PBI service.") + enablePowerBIService?: boolean; +} + +@doc("The detail of firewall rule.") +model IPv4FirewallRule { + @doc("The rule name.") + firewallRuleName?: string; + + @doc("The start range of IPv4.") + rangeStart?: string; + + @doc("The end range of IPv4.") + rangeEnd?: string; +} + +@doc("Represents an instance of an Analysis Services resource.") +model Resource { + @doc("An identifier that represents the Analysis Services resource.") + @visibility("read") + id?: string; + + @doc("The name of the Analysis Services resource.") + @visibility("read") + name?: string; + + @doc("The type of the Analysis Services resource.") + @visibility("read") + type?: string; + + @doc("Location of the Analysis Services resource.") + @visibility("read", "create") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + location: string; + + @doc("The SKU of the Analysis Services resource.") + sku: ResourceSku; + + @doc("Key-value pairs of additional resource provisioning properties.") + tags?: Record; +} + +@doc("Provision request specification") +model AnalysisServicesServerUpdateParameters { + @doc("The SKU of the Analysis Services resource.") + sku?: ResourceSku; + + @doc("Key-value pairs of additional provisioning properties.") + tags?: Record; + + @doc("Properties of the provision operation request.") + properties?: AnalysisServicesServerMutableProperties; +} + +@doc("An object that represents enumerating SKUs for existing resources.") +model SkuEnumerationForExistingResourceResult { + @doc("The collection of available SKUs for existing resources.") + value?: SkuDetailsForExistingResource[]; +} + +@doc("An object that represents SKU details for existing resources.") +model SkuDetailsForExistingResource { + @doc("The SKU in SKU details for existing resources.") + sku?: ResourceSku; + + @doc("The resource type.") + resourceType?: string; +} + +@doc("Status of gateway is live.") +model GatewayListStatusLive { + @doc("Live message of list gateway. Status: 0 - Live") + status?: 0; +} + +@doc("Status of gateway is error.") +@error +model GatewayListStatusError { + @doc("Error of the list gateway status.") + error?: ErrorDetail; +} + +@doc("Details of server name request body.") +model CheckServerNameAvailabilityParameters { + @doc("Name for checking availability.") + @maxLength(63) + @minLength(3) + @pattern("^[a-z][a-z0-9]*$") + name?: string; + + @doc("The resource type of azure analysis services.") + type?: string; +} + +@doc("The checking result of server name availability.") +model CheckServerNameAvailabilityResult { + @doc("Indicator of available of the server name.") + nameAvailable?: boolean; + + @doc("The reason of unavailability.") + reason?: string; + + @doc("The detailed message of the request unavailability.") + message?: string; +} + +@doc("Additional properties to expose performance metrics to shoebox.") +model OperationProperties { + @doc("Performance metrics to shoebox.") + serviceSpecification?: OperationPropertiesServiceSpecification; +} + +@doc("Performance metrics to shoebox.") +model OperationPropertiesServiceSpecification { + @doc("The metric specifications.") + @visibility("read") + metricSpecifications?: MetricSpecifications[]; + + @doc("The log specifications.") + @visibility("read") + logSpecifications?: LogSpecifications[]; +} + +@doc("Available operation metric specification for exposing performance metrics to shoebox.") +model MetricSpecifications { + @doc("The name of metric.") + @visibility("read") + name?: string; + + @doc("The displayed name of metric.") + @visibility("read") + displayName?: string; + + @doc("The displayed description of metric.") + @visibility("read") + displayDescription?: string; + + @doc("The unit of the metric.") + @visibility("read") + unit?: string; + + @doc("The aggregation type of metric.") + @visibility("read") + aggregationType?: string; + + @doc("The dimensions of metric.") + @visibility("read") + dimensions?: MetricDimensions[]; +} + +@doc("Metric dimension.") +model MetricDimensions { + @doc("Dimension name.") + @visibility("read") + name?: string; + + @doc("Dimension display name.") + @visibility("read") + displayName?: string; +} + +@doc("The log metric specification for exposing performance metrics to shoebox.") +model LogSpecifications { + @doc("The name of metric.") + @visibility("read") + name?: string; + + @doc("The displayed name of log.") + @visibility("read") + displayName?: string; + + @doc("The blob duration for the log.") + @visibility("read") + blobDuration?: string; +} + +@doc("The status of operation.") +model OperationStatus { + @doc("The operation Id.") + id?: string; + + @doc("The operation name.") + name?: string; + + @doc("The start time of the operation.") + startTime?: string; + + @doc("The end time of the operation.") + endTime?: string; + + @doc("The status of the operation.") + status?: string; + + @doc("The error detail of the operation if any.") + error?: ErrorDetail; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..0f785c611e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-analysisservices/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/analysisservices.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp index 3cff2c8932..3b337f1772 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AccessInformationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Tenant Settings.") @@ -22,18 +24,26 @@ model AccessInformationContract } @armResourceOperations -interface TenantAccess { +interface AccessInformationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tenant access information details without secrets.") + @operationId("TenantAccess_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Tenant access metadata") @head + @operationId("TenantAccess_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AccessInformationContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update tenant access information details.") + @operationId("TenantAccess_Create") create is ArmResourceCreateOrReplaceSync< AccessInformationContract, { @@ -44,10 +54,13 @@ interface TenantAccess { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update tenant access information details.") - update is ArmResourcePatchSync< + @operationId("TenantAccess_Update") + update is ArmCustomPatchSync< AccessInformationContract, - AccessInformationContractProperties, + AccessInformationUpdateParameters, { ...BaseParameters; @@ -56,7 +69,10 @@ interface TenantAccess { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Returns list of access infos - for Git and Management endpoints.") + @operationId("TenantAccess_ListByService") listByService is ArmResourceListByParent< AccessInformationContract, { @@ -67,32 +83,43 @@ interface TenantAccess { $filter?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate primary access key") + @operationId("TenantAccess_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate secondary access key") + @operationId("TenantAccess_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tenant access information details.") + @operationId("TenantAccess_ListSecrets") listSecrets is ArmResourceActionSync< AccessInformationContract, void, AccessInformationSecretsContract >; -} -@armResourceOperations -interface TenantAccessGit { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate primary access key for GIT.") + @operationId("TenantAccessGit_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerate secondary access key for GIT.") + @operationId("TenantAccessGit_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< AccessInformationContract, void diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp index 709d91042d..bd7b10e894 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API details.") @@ -24,15 +26,23 @@ model ApiContract is ProxyResource { } @armResourceOperations -interface Api { +interface ApiContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the API specified by its identifier.") + @operationId("Api_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the API specified by its identifier.") @head + @operationId("Api_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates new or updates existing specified API of the API Management service instance.") + @operationId("Api_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< ApiContract, { @@ -41,12 +51,16 @@ interface Api { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the specified API of the API Management service instance.") - update is ArmResourcePatchSync< + @operationId("Api_Update") + update is ArmCustomPatchSync< ApiContract, - ApiContractProperties, + ApiUpdateContract, { ...BaseParameters; @@ -55,7 +69,10 @@ interface Api { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified API of the API Management service instance.") + @operationId("Api_Delete") delete is ArmResourceDeleteSync< ApiContract, { @@ -70,7 +87,10 @@ interface Api { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all APIs of the API Management service instance.") + @operationId("Api_ListByService") listByService is ArmResourceListByParent< ApiContract, { @@ -98,11 +118,11 @@ interface Api { expandApiVersionSet?: boolean; } >; -} -@armResourceOperations -interface ApiRevision { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiRevision_ListByService") @doc("Lists all revisions of an API.") + // FIXME: ApiRevision_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/revisions") @get ListByService is Azure.Core.Foundations.Operation< @@ -143,11 +163,11 @@ interface ApiRevision { }, ApiRevisionListResult >; -} -@armResourceOperations -interface ApiProduct { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiProduct_ListByApis") @doc("Lists all Products, which the API is part of.") + // FIXME: ApiProduct_ListByApis could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/products") @get ListByApis is Azure.Core.Foundations.Operation< @@ -186,13 +206,13 @@ interface ApiProduct { @path subscriptionId: string; }, - ProductListResult + ResourceListResult >; -} -@armResourceOperations -interface Operation { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Operation_ListByTags") @doc("Lists a collection of operations associated with tags.") + // FIXME: Operation_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operationsByTags") @get ListByTags is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp index 3410fc5600..16c7da4b0b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiManagementServiceResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("A single API Management service resource in List or Get response.") @@ -33,61 +35,96 @@ model ApiManagementServiceResource } @armResourceOperations -interface ApiManagementService { +interface ApiManagementServiceResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets an API Management service resource description.") + @operationId("ApiManagementService_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates an API Management service. This is long running operation and could take several minutes to complete.") + @operationId("ApiManagementService_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing API Management service.") - update is ArmResourcePatchAsync< + @operationId("ApiManagementService_Update") + update is ArmCustomPatchAsync< ApiManagementServiceResource, - ApiManagementServiceProperties + ApiManagementServiceUpdateParameters >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes an existing API Management service.") + @operationId("ApiManagementService_Delete") delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all API Management services within a resource group.") + @operationId("ApiManagementService_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all API Management services within an Azure subscription.") + @operationId("ApiManagementService_List") list is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.") + @operationId("PerformConnectivityCheckAsync") + performConnectivityCheckAsync is ArmResourceActionAsync< + ApiManagementServiceResource, + ConnectivityCheckRequest, + ConnectivityCheckResponse, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several minutes to complete.") + @operationId("ApiManagementService_Restore") restore is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceResource + ApiManagementServiceResource, + BaseParameters, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete.") + @operationId("ApiManagementService_Backup") backup is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceBackupRestoreParameters, - ApiManagementServiceResource + ApiManagementServiceResource, + BaseParameters, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes.") + @operationId("ApiManagementService_GetSsoToken") getSsoToken is ArmResourceActionSync< ApiManagementServiceResource, void, ApiManagementServiceGetSsoTokenResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes.") + @operationId("ApiManagementService_ApplyNetworkConfigurationUpdates") applyNetworkConfigurationUpdates is ArmResourceActionAsync< ApiManagementServiceResource, ApiManagementServiceApplyNetworkConfigurationParameters, - ApiManagementServiceResource - >; -} - -@armResourceOperations -interface ApiManagementServices { - @doc("Performs a connectivity check between the API Management service and a given destination, and returns metrics for the connection, as well as errors encountered while trying to establish it.") - performConnectivityCheckAsync is ArmResourceActionAsync< ApiManagementServiceResource, - ConnectivityCheckRequest, - ConnectivityCheckResponse + BaseParameters, + ArmLroLocationHeader >; -} -@armResourceOperations -interface TenantConfiguration { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete.") + @operationId("TenantConfiguration_Deploy") deploy is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -98,9 +135,13 @@ interface TenantConfiguration { @doc("The identifier of the Git Configuration Operation.") @path configurationName: ConfigurationIdName; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete.") + @operationId("TenantConfiguration_Save") save is ArmResourceActionAsync< ApiManagementServiceResource, SaveConfigurationParameter, @@ -111,9 +152,13 @@ interface TenantConfiguration { @doc("The identifier of the Git Configuration Operation.") @path configurationName: ConfigurationIdName; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete.") + @operationId("TenantConfiguration_Validate") validate is ArmResourceActionAsync< ApiManagementServiceResource, DeployConfigurationParameters, @@ -121,42 +166,22 @@ interface TenantConfiguration { { ...BaseParameters; - @doc("The identifier of the Git Configuration Operation.") - @path - configurationName: ConfigurationIdName; - } - >; - @doc("Gets the status of the most recent synchronization between the configuration database and the Git repository.") - @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") - @get - GetSyncState is Azure.Core.Foundations.Operation< - { - @doc("The name of the resource group.") - @path - resourceGroupName: string; - - @doc("The name of the API Management service.") - @maxLength(50) - @minLength(1) - @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") - @path - serviceName: string; - - @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") - @path - subscriptionId: string; - @doc("The identifier of the Git Configuration Operation.") @path configurationName: ConfigurationIdName; }, - TenantConfigurationSyncStateContract + ArmLroLocationHeader >; -} -@armResourceOperations -interface Api { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Checks availability and correctness of a name for an API Management service.") + @operationId("ApiManagementService_CheckNameAvailability") + checkNameAvailability is checkGlobalNameAvailability; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Api_ListByTags") @doc("Lists a collection of apis associated with tags.") + // FIXME: Api_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apisByTags") @get ListByTags is Azure.Core.Foundations.Operation< @@ -195,11 +220,11 @@ interface Api { }, TagResourceListResult >; -} -@armResourceOperations -interface ContentType { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentType_ListByService") @doc("Lists the developer portal's content types. Content types describe content items' properties, validation rules, and constraints.") + // FIXME: ContentType_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes") @get ListByService is Azure.Core.Foundations.Operation< @@ -222,7 +247,10 @@ interface ContentType { ContentTypeListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentType_Get") @doc("Gets the details of the developer portal's content type. Content types describe content items' properties, validation rules, and constraints.") + // FIXME: ContentType_Get could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}") @get Get is Azure.Core.Foundations.Operation< @@ -250,11 +278,11 @@ interface ContentType { }, ContentTypeContract >; -} -@armResourceOperations -interface ContentItem { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentItem_ListByService") @doc("Lists developer portal's content items specified by the provided content type.") + // FIXME: ContentItem_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems") @get ListByService is Azure.Core.Foundations.Operation< @@ -283,7 +311,10 @@ interface ContentItem { ContentItemListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ContentItem_Get") @doc("Returns the developer portal's content item specified by its identifier.") + // FIXME: ContentItem_Get could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId}") @get Get is Azure.Core.Foundations.Operation< @@ -317,12 +348,12 @@ interface ContentItem { }, ContentItemContract >; -} -@armResourceOperations -interface ApiManagementServiceSkus { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ApiManagementServiceSkus_ListAvailableServiceSkus") @summary("Gets available SKUs for API Management service") @doc("Gets all available SKU for a given API Management service") + // FIXME: ApiManagementServiceSkus_ListAvailableServiceSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus") @get ListAvailableServiceSkus is Azure.Core.Foundations.Operation< @@ -344,11 +375,11 @@ interface ApiManagementServiceSkus { }, ResourceSkuResults >; -} -@armResourceOperations -interface NetworkStatus { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NetworkStatus_ListByService") @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") + // FIXME: NetworkStatus_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/networkstatus") @get ListByService is Azure.Core.Foundations.Operation< @@ -371,7 +402,10 @@ interface NetworkStatus { void >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NetworkStatus_ListByLocation") @doc("Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the CloudService.") + // FIXME: NetworkStatus_ListByLocation could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/locations/{locationName}/networkstatus") @get ListByLocation is Azure.Core.Foundations.Operation< @@ -398,11 +432,11 @@ interface NetworkStatus { }, NetworkStatusContract >; -} -@armResourceOperations -interface OutboundNetworkDependenciesEndpoints { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OutboundNetworkDependenciesEndpoints_ListByService") @doc("Gets the network endpoints of all outbound dependencies of a ApiManagement service.") + // FIXME: OutboundNetworkDependenciesEndpoints_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints") @get ListByService is Azure.Core.Foundations.Operation< @@ -424,11 +458,11 @@ interface OutboundNetworkDependenciesEndpoints { }, OutboundEnvironmentEndpointList >; -} -@armResourceOperations -interface PolicyDescription { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PolicyDescription_ListByService") @doc("Lists all policy descriptions.") + // FIXME: PolicyDescription_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyDescriptions") @get ListByService is Azure.Core.Foundations.Operation< @@ -454,11 +488,11 @@ interface PolicyDescription { }, PolicyDescriptionListResult >; -} -@armResourceOperations -interface PortalSettings { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PortalSettings_ListByService") @doc("Lists a collection of portalsettings defined within a service instance..") + // FIXME: PortalSettings_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/portalsettings") @get ListByService is Azure.Core.Foundations.Operation< @@ -478,13 +512,13 @@ interface PortalSettings { @path subscriptionId: string; }, - PortalSettingsListResult + ResourceListResult >; -} -@armResourceOperations -interface Product { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Product_ListByTags") @doc("Lists a collection of products associated with tags.") + // FIXME: Product_ListByTags could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags") @get ListByTags is Azure.Core.Foundations.Operation< @@ -523,11 +557,11 @@ interface Product { }, TagResourceListResult >; -} -@armResourceOperations -interface QuotaByCounterKeys { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QuotaByCounterKeys_ListByService") @doc("Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet.") + // FIXME: QuotaByCounterKeys_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/quotas/{quotaCounterKey}") @get ListByService is Azure.Core.Foundations.Operation< @@ -553,17 +587,17 @@ interface QuotaByCounterKeys { }, QuotaCounterListResult >; -} -@armResourceOperations -interface QuotaByPeriodKeys { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("QuotaByPeriodKeys_Get") @doc("Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance.") + // FIXME: QuotaByPeriodKeys_Get could not be converted to a resource operation Get is Azure.Core.ResourceRead; -} -@armResourceOperations -interface Region { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Region_ListByService") @doc("Lists all azure regions in which the service exists.") + // FIXME: Region_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/regions") @get ListByService is Azure.Core.Foundations.Operation< @@ -585,11 +619,11 @@ interface Region { }, RegionListResult >; -} -@armResourceOperations -interface Reports { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByApi") @doc("Lists report records by API.") + // FIXME: Reports_ListByApi could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byApi") @get ListByApi is Azure.Core.Foundations.Operation< @@ -629,7 +663,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByUser") @doc("Lists report records by User.") + // FIXME: Reports_ListByUser could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byUser") @get ListByUser is Azure.Core.Foundations.Operation< @@ -669,7 +706,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByOperation") @doc("Lists report records by API Operations.") + // FIXME: Reports_ListByOperation could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byOperation") @get ListByOperation is Azure.Core.Foundations.Operation< @@ -709,7 +749,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByProduct") @doc("Lists report records by Product.") + // FIXME: Reports_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byProduct") @get ListByProduct is Azure.Core.Foundations.Operation< @@ -749,7 +792,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByGeo") @doc("Lists report records by geography.") + // FIXME: Reports_ListByGeo could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byGeo") @get ListByGeo is Azure.Core.Foundations.Operation< @@ -785,7 +831,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListBySubscription") @doc("Lists report records by subscription.") + // FIXME: Reports_ListBySubscription could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/bySubscription") @get ListBySubscription is Azure.Core.Foundations.Operation< @@ -825,7 +874,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByTime") @doc("Lists report records by Time.") + // FIXME: Reports_ListByTime could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byTime") @get ListByTime is Azure.Core.Foundations.Operation< @@ -869,7 +921,10 @@ interface Reports { ReportListResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("Reports_ListByRequest") @doc("Lists report records by Request.") + // FIXME: Reports_ListByRequest could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/reports/byRequest") @get ListByRequest is Azure.Core.Foundations.Operation< @@ -904,11 +959,11 @@ interface Reports { }, RequestReportListResult >; -} -@armResourceOperations -interface TagResource { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TagResource_ListByService") @doc("Lists a collection of resources associated with tags.") + // FIXME: TagResource_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tagResources") @get ListByService is Azure.Core.Foundations.Operation< @@ -943,4 +998,34 @@ interface TagResource { }, TagResourceListResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("TenantConfiguration_GetSyncState") + @doc("Gets the status of the most recent synchronization between the configuration database and the Git repository.") + // FIXME: TenantConfiguration_GetSyncState could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/tenant/{configurationName}/syncState") + @get + GetSyncState is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the API Management service.") + @maxLength(50) + @minLength(1) + @pattern("^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$") + @path + serviceName: string; + + @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") + @path + subscriptionId: string; + + @doc("The identifier of the Git Configuration Operation.") + @path + configurationName: ConfigurationIdName; + }, + TenantConfigurationSyncStateContract + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp index 308471a5a9..8c2352e091 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiReleaseContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("ApiRelease details.") @@ -24,18 +26,26 @@ model ApiReleaseContract is ProxyResource { } @armResourceOperations -interface ApiRelease { +interface ApiReleaseContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Returns the details of an API release.") + @operationId("ApiRelease_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Returns the etag of an API release.") @head + @operationId("ApiRelease_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiReleaseContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Release for the API.") + @operationId("ApiRelease_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiReleaseContract, { @@ -46,10 +56,13 @@ interface ApiRelease { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the release of the API specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiRelease_Update") + update is ArmCustomPatchSync< + ApiReleaseContract, ApiReleaseContract, - ApiReleaseContractProperties, { ...BaseParameters; @@ -58,7 +71,10 @@ interface ApiRelease { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified release in the API.") + @operationId("ApiRelease_Delete") delete is ArmResourceDeleteSync< ApiReleaseContract, { @@ -69,7 +85,10 @@ interface ApiRelease { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be constrained by the $top and $skip parameters.") + @operationId("ApiRelease_ListByService") listByService is ArmResourceListByParent< ApiReleaseContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp index be62af42e7..653ba9f730 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ApiVersionSetContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API Version Set Contract details.") @@ -24,18 +26,26 @@ model ApiVersionSetContract is ProxyResource { } @armResourceOperations -interface ApiVersionSet { +interface ApiVersionSetContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Api Version Set specified by its identifier.") + @operationId("ApiVersionSet_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Api Version Set specified by its identifier.") @head + @operationId("ApiVersionSet_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ApiVersionSetContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a Api Version Set.") + @operationId("ApiVersionSet_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ApiVersionSetContract, { @@ -46,10 +56,13 @@ interface ApiVersionSet { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the Api VersionSet specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiVersionSet_Update") + update is ArmCustomPatchSync< ApiVersionSetContract, - ApiVersionSetContractProperties, + ApiVersionSetUpdateParameters, { ...BaseParameters; @@ -58,7 +71,10 @@ interface ApiVersionSet { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Api Version Set.") + @operationId("ApiVersionSet_Delete") delete is ArmResourceDeleteSync< ApiVersionSetContract, { @@ -69,7 +85,10 @@ interface ApiVersionSet { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of API Version Sets in the specified service instance.") + @operationId("ApiVersionSet_ListByService") listByService is ArmResourceListByParent< ApiVersionSetContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp index 7ff51d159d..7fd71b9dae 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/AuthorizationServerContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("External OAuth authorization server settings.") @@ -25,18 +27,26 @@ model AuthorizationServerContract } @armResourceOperations -interface AuthorizationServer { +interface AuthorizationServerContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the authorization server specified by its identifier.") + @operationId("AuthorizationServer_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the authorizationServer specified by its identifier.") @head + @operationId("AuthorizationServer_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< AuthorizationServerContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates new authorization server or updates an existing authorization server.") + @operationId("AuthorizationServer_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< AuthorizationServerContract, { @@ -47,10 +57,13 @@ interface AuthorizationServer { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the authorization server specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("AuthorizationServer_Update") + update is ArmCustomPatchSync< AuthorizationServerContract, - AuthorizationServerContractProperties, + AuthorizationServerUpdateContract, { ...BaseParameters; @@ -59,7 +72,10 @@ interface AuthorizationServer { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific authorization server instance.") + @operationId("AuthorizationServer_Delete") delete is ArmResourceDeleteSync< AuthorizationServerContract, { @@ -70,7 +86,10 @@ interface AuthorizationServer { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of authorization servers defined within a service instance.") + @operationId("AuthorizationServer_ListByService") listByService is ArmResourceListByParent< AuthorizationServerContract, { @@ -90,7 +109,10 @@ interface AuthorizationServer { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the client secret details of the authorization server.") + @operationId("AuthorizationServer_ListSecrets") listSecrets is ArmResourceActionSync< AuthorizationServerContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp index 73937f5a10..a2688e4528 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/BackendContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Backend details.") @@ -23,18 +25,26 @@ model BackendContract is ProxyResource { } @armResourceOperations -interface Backend { +interface BackendContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the backend specified by its identifier.") + @operationId("Backend_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the backend specified by its identifier.") @head + @operationId("Backend_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< BackendContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a backend.") + @operationId("Backend_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< BackendContract, { @@ -45,10 +55,13 @@ interface Backend { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing backend.") - update is ArmResourcePatchSync< + @operationId("Backend_Update") + update is ArmCustomPatchSync< BackendContract, - BackendContractProperties, + BackendUpdateParameters, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Backend { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified backend.") + @operationId("Backend_Delete") delete is ArmResourceDeleteSync< BackendContract, { @@ -68,7 +84,10 @@ interface Backend { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of backends in the specified service instance.") + @operationId("Backend_ListByService") listByService is ArmResourceListByParent< BackendContract, { @@ -88,7 +107,10 @@ interface Backend { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used.") + @operationId("Backend_Reconnect") reconnect is ArmResourceActionNoContentSync< BackendContract, BackendReconnectContract diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp index 4bf59b5902..03c56a82c9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CacheContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Cache details.") @@ -24,15 +26,23 @@ model CacheContract is ProxyResource { } @armResourceOperations -interface Cache { +interface CacheContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Cache specified by its identifier.") + @operationId("Cache_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Cache specified by its identifier.") @head + @operationId("Cache_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates an External Cache to be used in Api Management instance.") + @operationId("Cache_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CacheContract, { @@ -43,10 +53,13 @@ interface Cache { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the cache specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Cache_Update") + update is ArmCustomPatchSync< CacheContract, - CacheContractProperties, + CacheUpdateParameters, { ...BaseParameters; @@ -55,7 +68,10 @@ interface Cache { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Cache.") + @operationId("Cache_Delete") delete is ArmResourceDeleteSync< CacheContract, { @@ -66,7 +82,10 @@ interface Cache { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of all external Caches in the specified service instance.") + @operationId("Cache_ListByService") listByService is ArmResourceListByParent< CacheContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp index 2889618329..a3cdffa810 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/CertificateContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Certificate details.") @@ -24,18 +26,26 @@ model CertificateContract is ProxyResource { } @armResourceOperations -interface Certificate { +interface CertificateContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the certificate specified by its identifier.") + @operationId("Certificate_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the certificate specified by its identifier.") @head + @operationId("Certificate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< CertificateContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates the certificate being used for authentication with the backend.") + @operationId("Certificate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< CertificateContract, { @@ -46,7 +56,10 @@ interface Certificate { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific certificate.") + @operationId("Certificate_Delete") delete is ArmResourceDeleteSync< CertificateContract, { @@ -57,7 +70,10 @@ interface Certificate { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of all certificates in the specified service instance.") + @operationId("Certificate_ListByService") listByService is ArmResourceListByParent< CertificateContract, { @@ -81,7 +97,10 @@ interface Certificate { isKeyVaultRefreshFailed?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("From KeyVault, Refresh the certificate being used for authentication with the backend.") + @operationId("Certificate_RefreshSecret") refreshSecret is ArmResourceActionSync< CertificateContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp index 6a1a77d4d7..f2b6414108 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DeletedServiceContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Deleted API Management Service information.") @@ -24,11 +26,23 @@ model DeletedServiceContract } @armResourceOperations -interface DeletedServices { +interface DeletedServiceContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get soft-deleted Api Management Service by name.") + @operationId("DeletedServices_GetByName") getByName is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Purges Api Management Service (deletes it with no option to undelete).") - purge is ArmResourceDeleteAsync; + @operationId("DeletedServices_Purge") + purge is ArmResourceDeleteAsync< + DeletedServiceContract, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all soft-deleted services available for undelete for the given subscription.") + @operationId("DeletedServices_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp index ac95d3d06d..b119230810 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/DiagnosticContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Diagnostic details.") @@ -24,18 +26,26 @@ model DiagnosticContract is ProxyResource { } @armResourceOperations -interface ApiDiagnostic { +interface DiagnosticContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Diagnostic for an API specified by its identifier.") + @operationId("ApiDiagnostic_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier.") @head + @operationId("ApiDiagnostic_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< DiagnosticContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Diagnostic for an API or updates an existing one.") + @operationId("ApiDiagnostic_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< DiagnosticContract, { @@ -46,10 +56,13 @@ interface ApiDiagnostic { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the Diagnostic for an API specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiDiagnostic_Update") + update is ArmCustomPatchSync< + DiagnosticContract, DiagnosticContract, - DiagnosticContractProperties, { ...BaseParameters; @@ -58,7 +71,10 @@ interface ApiDiagnostic { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified Diagnostic from an API.") + @operationId("ApiDiagnostic_Delete") delete is ArmResourceDeleteSync< DiagnosticContract, { @@ -69,7 +85,10 @@ interface ApiDiagnostic { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all diagnostics of an API.") + @operationId("ApiDiagnostic_ListByService") listByService is ArmResourceListByParent< DiagnosticContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp index bfdb754165..e9da89e30c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/EmailTemplateContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Email Template details.") @@ -21,18 +23,26 @@ model EmailTemplateContract is ProxyResource { } @armResourceOperations -interface EmailTemplate { +interface EmailTemplateContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the email template specified by its identifier.") + @operationId("EmailTemplate_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the email template specified by its identifier.") @head + @operationId("EmailTemplate_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< EmailTemplateContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an Email Template.") + @operationId("EmailTemplate_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< EmailTemplateContract, { @@ -43,10 +53,13 @@ interface EmailTemplate { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates API Management email template") - update is ArmResourcePatchSync< + @operationId("EmailTemplate_Update") + update is ArmCustomPatchSync< EmailTemplateContract, - EmailTemplateContractProperties, + EmailTemplateUpdateParameters, { ...BaseParameters; @@ -55,7 +68,10 @@ interface EmailTemplate { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Reset the Email Template to default template provided by the API Management service instance.") + @operationId("EmailTemplate_Delete") delete is ArmResourceDeleteSync< EmailTemplateContract, { @@ -66,7 +82,10 @@ interface EmailTemplate { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets all email templates") + @operationId("EmailTemplate_ListByService") listByService is ArmResourceListByParent< EmailTemplateContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp index 993a750342..5816a60db4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayCertificateAuthorityContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GatewayContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Gateway certificate authority details.") @@ -25,18 +27,26 @@ model GatewayCertificateAuthorityContract } @armResourceOperations -interface GatewayCertificateAuthority { +interface GatewayCertificateAuthorityContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get assigned Gateway Certificate Authority details.") + @operationId("GatewayCertificateAuthority_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Checks if Certificate entity is assigned to Gateway entity as Certificate Authority.") @head + @operationId("GatewayCertificateAuthority_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayCertificateAuthorityContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Assign Certificate entity to Gateway entity as Certificate Authority.") + @operationId("GatewayCertificateAuthority_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayCertificateAuthorityContract, { @@ -47,7 +57,10 @@ interface GatewayCertificateAuthority { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Remove relationship between Certificate Authority and Gateway entity.") + @operationId("GatewayCertificateAuthority_Delete") delete is ArmResourceDeleteSync< GatewayCertificateAuthorityContract, { @@ -58,7 +71,10 @@ interface GatewayCertificateAuthority { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the collection of Certificate Authorities for the specified Gateway entity.") + @operationId("GatewayCertificateAuthority_ListByService") listByService is ArmResourceListByParent< GatewayCertificateAuthorityContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp index 1c0e7c605f..5060171ccd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Gateway details.") @@ -23,18 +25,26 @@ model GatewayContract is ProxyResource { } @armResourceOperations -interface Gateway { +interface GatewayContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Gateway specified by its identifier.") + @operationId("Gateway_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Gateway specified by its identifier.") @head + @operationId("Gateway_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates a Gateway to be used in Api Management instance.") + @operationId("Gateway_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayContract, { @@ -45,10 +55,13 @@ interface Gateway { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the gateway specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Gateway_Update") + update is ArmCustomPatchSync< + GatewayContract, GatewayContract, - GatewayContractProperties, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Gateway { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Gateway.") + @operationId("Gateway_Delete") delete is ArmResourceDeleteSync< GatewayContract, { @@ -68,7 +84,10 @@ interface Gateway { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of gateways registered with service instance.") + @operationId("Gateway_ListByService") listByService is ArmResourceListByParent< GatewayContract, { @@ -88,24 +107,33 @@ interface Gateway { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Retrieves gateway keys.") + @operationId("Gateway_ListKeys") listKeys is ArmResourceActionSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerates specified gateway key invalidating any tokens created with it.") + @operationId("Gateway_RegenerateKey") regenerateKey is ArmResourceActionNoContentSync< GatewayContract, GatewayKeyRegenerationRequestContract >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the Shared Access Authorization Token for the gateway.") + @operationId("Gateway_GenerateToken") generateToken is ArmResourceActionSync< GatewayContract, GatewayTokenRequestContract, GatewayTokenContract >; -} -@armResourceOperations -interface GatewayApi { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GatewayApi_ListByService") @doc("Lists a collection of the APIs associated with a gateway.") + // FIXME: GatewayApi_ListByService could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/gateways/{gatewayId}/apis") @get ListByService is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp index fde6ee1b04..cf3db9b401 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GatewayHostnameConfigurationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GatewayContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Gateway hostname configuration details.") @@ -24,18 +26,26 @@ model GatewayHostnameConfigurationContract } @armResourceOperations -interface GatewayHostnameConfiguration { +interface GatewayHostnameConfigurationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get details of a hostname configuration") + @operationId("GatewayHostnameConfiguration_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Checks that hostname configuration entity specified by identifier exists for specified Gateway entity.") @head + @operationId("GatewayHostnameConfiguration_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GatewayHostnameConfigurationContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates of updates hostname configuration for a Gateway.") + @operationId("GatewayHostnameConfiguration_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GatewayHostnameConfigurationContract, { @@ -46,7 +56,10 @@ interface GatewayHostnameConfiguration { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified hostname configuration from the specified Gateway.") + @operationId("GatewayHostnameConfiguration_Delete") delete is ArmResourceDeleteSync< GatewayHostnameConfigurationContract, { @@ -57,7 +70,10 @@ interface GatewayHostnameConfiguration { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists the collection of hostname configurations for the specified gateway.") + @operationId("GatewayHostnameConfiguration_ListByService") listByService is ArmResourceListByParent< GatewayHostnameConfigurationContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp index 8e2f4af4d9..15b4ef58fd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GlobalSchemaContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Global Schema Contract details.") @@ -23,18 +25,26 @@ model GlobalSchemaContract is ProxyResource { } @armResourceOperations -interface GlobalSchema { +interface GlobalSchemaContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Schema specified by its identifier.") + @operationId("GlobalSchema_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Schema specified by its identifier.") @head + @operationId("GlobalSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< GlobalSchemaContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates new or updates existing specified Schema of the API Management service instance.") + @operationId("GlobalSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< GlobalSchemaContract, { @@ -43,9 +53,13 @@ interface GlobalSchema { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific Schema.") + @operationId("GlobalSchema_Delete") delete is ArmResourceDeleteSync< GlobalSchemaContract, { @@ -56,7 +70,10 @@ interface GlobalSchema { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of schemas registered with service instance.") + @operationId("GlobalSchema_ListByService") listByService is ArmResourceListByParent< GlobalSchemaContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp index 52e4f203c1..a98a44d844 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/GroupContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Contract details.") @@ -23,15 +25,23 @@ model GroupContract is ProxyResource { } @armResourceOperations -interface Group { +interface GroupContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the group specified by its identifier.") + @operationId("Group_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the group specified by its identifier.") @head + @operationId("Group_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a group.") + @operationId("Group_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< GroupContract, { @@ -42,10 +52,13 @@ interface Group { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the group specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Group_Update") + update is ArmCustomPatchSync< GroupContract, - GroupContractProperties, + GroupUpdateParameters, { ...BaseParameters; @@ -54,7 +67,10 @@ interface Group { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific group of the API Management service instance.") + @operationId("Group_Delete") delete is ArmResourceDeleteSync< GroupContract, { @@ -65,7 +81,10 @@ interface Group { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of groups defined within a service instance.") + @operationId("Group_ListByService") listByService is ArmResourceListByParent< GroupContract, { @@ -85,11 +104,11 @@ interface Group { $skip?: int32; } >; -} -@armResourceOperations -interface GroupUser { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("GroupUser_List") @doc("Lists a collection of user entities associated with the group.") + // FIXME: GroupUser_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}/users") @get List is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp index e25ce0601e..898881f736 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IdentityProviderContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Identity Provider details.") @@ -22,18 +24,26 @@ model IdentityProviderContract } @armResourceOperations -interface IdentityProvider { +interface IdentityProviderContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the configuration details of the identity Provider configured in specified service instance.") + @operationId("IdentityProvider_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the identityProvider specified by its identifier.") @head + @operationId("IdentityProvider_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IdentityProviderContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates the IdentityProvider configuration.") + @operationId("IdentityProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IdentityProviderContract, { @@ -44,10 +54,13 @@ interface IdentityProvider { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing IdentityProvider configuration.") - update is ArmResourcePatchSync< + @operationId("IdentityProvider_Update") + update is ArmCustomPatchSync< IdentityProviderContract, - IdentityProviderContractProperties, + IdentityProviderUpdateParameters, { ...BaseParameters; @@ -56,7 +69,10 @@ interface IdentityProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified identity provider configuration.") + @operationId("IdentityProvider_Delete") delete is ArmResourceDeleteSync< IdentityProviderContract, { @@ -67,9 +83,15 @@ interface IdentityProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of Identity Provider configured in the specified service instance.") + @operationId("IdentityProvider_ListByService") listByService is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the client secret details of the Identity Provider.") + @operationId("IdentityProvider_ListSecrets") listSecrets is ArmResourceActionSync< IdentityProviderContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp index 8faa985bbf..c6f7fd9830 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueAttachmentContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./IssueContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Issue Attachment Contract details.") @@ -25,18 +27,26 @@ model IssueAttachmentContract } @armResourceOperations -interface ApiIssueAttachment { +interface IssueAttachmentContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the issue Attachment for an API specified by its identifier.") + @operationId("ApiIssueAttachment_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier.") @head + @operationId("ApiIssueAttachment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueAttachmentContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Attachment for the Issue in an API or updates an existing one.") + @operationId("ApiIssueAttachment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueAttachmentContract, { @@ -47,7 +57,10 @@ interface ApiIssueAttachment { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified comment from an Issue.") + @operationId("ApiIssueAttachment_Delete") delete is ArmResourceDeleteSync< IssueAttachmentContract, { @@ -58,7 +71,10 @@ interface ApiIssueAttachment { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all attachments for the Issue associated with the specified API.") + @operationId("ApiIssueAttachment_ListByService") listByService is ArmResourceListByParent< IssueAttachmentContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp index 9adc87735c..a157961fa5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueCommentContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./IssueContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Issue Comment Contract details.") @@ -24,18 +26,26 @@ model IssueCommentContract is ProxyResource { } @armResourceOperations -interface ApiIssueComment { +interface IssueCommentContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the issue Comment for an API specified by its identifier.") + @operationId("ApiIssueComment_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier.") @head + @operationId("ApiIssueComment_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< IssueCommentContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Comment for the Issue in an API or updates an existing one.") + @operationId("ApiIssueComment_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueCommentContract, { @@ -46,7 +56,10 @@ interface ApiIssueComment { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified comment from an Issue.") + @operationId("ApiIssueComment_Delete") delete is ArmResourceDeleteSync< IssueCommentContract, { @@ -57,7 +70,10 @@ interface ApiIssueComment { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all comments for the Issue associated with the specified API.") + @operationId("ApiIssueComment_ListByService") listByService is ArmResourceListByParent< IssueCommentContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp index e594e8c3e6..6696ba29ce 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/IssueContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Issue Contract details.") @@ -24,8 +26,10 @@ model IssueContract is ProxyResource { } @armResourceOperations -interface ApiIssue { +interface IssueContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Issue for an API specified by its identifier.") + @operationId("ApiIssue_Get") get is ArmResourceRead< IssueContract, { @@ -36,12 +40,18 @@ interface ApiIssue { expandCommentsAttachments?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the Issue for an API specified by its identifier.") @head + @operationId("ApiIssue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Issue for an API or updates an existing one.") + @operationId("ApiIssue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< IssueContract, { @@ -52,10 +62,13 @@ interface ApiIssue { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing issue for an API.") - update is ArmResourcePatchSync< + @operationId("ApiIssue_Update") + update is ArmCustomPatchSync< IssueContract, - IssueContractProperties, + IssueUpdateContract, { ...BaseParameters; @@ -64,7 +77,10 @@ interface ApiIssue { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified Issue from an API.") + @operationId("ApiIssue_Delete") delete is ArmResourceDeleteSync< IssueContract, { @@ -75,7 +91,10 @@ interface ApiIssue { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all issues associated with the specified API.") + @operationId("ApiIssue_ListByService") listByService is ArmResourceListByParent< IssueContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp index 866bf449c7..a67024359c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/LoggerContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Logger details.") @@ -23,18 +25,26 @@ model LoggerContract is ProxyResource { } @armResourceOperations -interface Logger { +interface LoggerContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the logger specified by its identifier.") + @operationId("Logger_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the logger specified by its identifier.") @head + @operationId("Logger_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< LoggerContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a logger.") + @operationId("Logger_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< LoggerContract, { @@ -45,10 +55,13 @@ interface Logger { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates an existing logger.") - update is ArmResourcePatchSync< + @operationId("Logger_Update") + update is ArmCustomPatchSync< LoggerContract, - LoggerContractProperties, + LoggerUpdateContract, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Logger { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified logger.") + @operationId("Logger_Delete") delete is ArmResourceDeleteSync< LoggerContract, { @@ -68,7 +84,10 @@ interface Logger { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of loggers in the specified service instance.") + @operationId("Logger_ListByService") listByService is ArmResourceListByParent< LoggerContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp index 8fe583a22b..9ad491998f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NamedValueContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("NamedValue details.") @@ -23,18 +25,26 @@ model NamedValueContract is ProxyResource { } @armResourceOperations -interface NamedValue { +interface NamedValueContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the named value specified by its identifier.") + @operationId("NamedValue_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the named value specified by its identifier.") @head + @operationId("NamedValue_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< NamedValueContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates named value.") + @operationId("NamedValue_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< NamedValueContract, { @@ -43,21 +53,29 @@ interface NamedValue { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the specific named value.") - update is ArmResourcePatchAsync< + @operationId("NamedValue_Update") + update is ArmCustomPatchAsync< NamedValueContract, - NamedValueContractProperties, + NamedValueUpdateParameters, { ...BaseParameters; @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") @header `If-Match`: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific named value from the API Management service instance.") + @operationId("NamedValue_Delete") delete is ArmResourceDeleteSync< NamedValueContract, { @@ -68,7 +86,10 @@ interface NamedValue { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of named values defined within a service instance.") + @operationId("NamedValue_ListByService") listByService is ArmResourceListByParent< NamedValueContract, { @@ -92,16 +113,24 @@ interface NamedValue { isKeyVaultRefreshFailed?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the secret of the named value specified by its identifier.") + @operationId("NamedValue_ListValue") listValue is ArmResourceActionSync< NamedValueContract, void, NamedValueSecretContract >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Refresh the secret of the named value specified by its identifier.") + @operationId("NamedValue_RefreshSecret") refreshSecret is ArmResourceActionAsync< NamedValueContract, void, - NamedValueContract + NamedValueContract, + BaseParameters, + ArmLroLocationHeader >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp index c1551a9940..d1ca373be1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/NotificationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Notification details.") @@ -21,10 +23,15 @@ model NotificationContract is ProxyResource { } @armResourceOperations -interface Notification { +interface NotificationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Notification specified by its identifier.") + @operationId("Notification_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update API Management publisher notification.") + @operationId("Notification_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< NotificationContract, { @@ -35,7 +42,10 @@ interface Notification { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of properties defined within a service instance.") + @operationId("Notification_ListByService") listByService is ArmResourceListByParent< NotificationContract, { @@ -51,11 +61,11 @@ interface Notification { $skip?: int32; } >; -} -@armResourceOperations -interface NotificationRecipientUser { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NotificationRecipientUser_ListByNotification") @doc("Gets the list of the Notification Recipient User subscribed to the notification.") + // FIXME: NotificationRecipientUser_ListByNotification could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientUsers") @get ListByNotification is Azure.Core.Foundations.Operation< @@ -81,11 +91,11 @@ interface NotificationRecipientUser { }, RecipientUserListResult >; -} -@armResourceOperations -interface NotificationRecipientEmail { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("NotificationRecipientEmail_ListByNotification") @doc("Gets the list of the Notification Recipient Emails subscribed to a notification.") + // FIXME: NotificationRecipientEmail_ListByNotification could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/notifications/{notificationName}/recipientEmails") @get ListByNotification is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp index cec6af808c..f756a97099 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OpenidConnectProviderContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("OpenId Connect Provider details.") @@ -24,8 +26,10 @@ model OpenidConnectProviderContract } @armResourceOperations -interface OpenIdConnectProvider { +interface OpenidConnectProviderContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets specific OpenID Connect Provider without secrets.") + @operationId("OpenIdConnectProvider_Get") get is ArmResourceRead< OpenidConnectProviderContract, { @@ -38,7 +42,10 @@ interface OpenIdConnectProvider { OpenId: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates the OpenID Connect Provider.") + @operationId("OpenIdConnectProvider_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OpenidConnectProviderContract, { @@ -55,10 +62,13 @@ interface OpenIdConnectProvider { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the specific OpenID Connect Provider.") - update is ArmResourcePatchSync< + @operationId("OpenIdConnectProvider_Update") + update is ArmCustomPatchSync< OpenidConnectProviderContract, - OpenidConnectProviderContractProperties, + OpenidConnectProviderUpdateContract, { ...BaseParameters; @@ -73,7 +83,10 @@ interface OpenIdConnectProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific OpenID Connect Provider of the API Management service instance.") + @operationId("OpenIdConnectProvider_Delete") delete is ArmResourceDeleteSync< OpenidConnectProviderContract, { @@ -90,7 +103,10 @@ interface OpenIdConnectProvider { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists of all the OpenId Connect Providers.") + @operationId("OpenIdConnectProvider_ListByService") listByService is ArmResourceListByParent< OpenidConnectProviderContract, { @@ -110,7 +126,10 @@ interface OpenIdConnectProvider { $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the client secret details of the OpenID Connect Provider.") + @operationId("OpenIdConnectProvider_ListSecrets") listSecrets is ArmResourceActionSync< OpenidConnectProviderContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp index 16720c5bcb..7b77e70775 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/OperationContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API Operation details.") @@ -23,18 +25,26 @@ model OperationContract is ProxyResource { } @armResourceOperations -interface ApiOperation { +interface OperationContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the API Operation specified by its identifier.") + @operationId("ApiOperation_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the API operation specified by its identifier.") @head + @operationId("ApiOperation_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< OperationContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new operation in the API or updates an existing one.") + @operationId("ApiOperation_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< OperationContract, { @@ -45,10 +55,13 @@ interface ApiOperation { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the operation in the API specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("ApiOperation_Update") + update is ArmCustomPatchSync< OperationContract, - OperationContractProperties, + OperationUpdateContract, { ...BaseParameters; @@ -57,7 +70,10 @@ interface ApiOperation { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified operation in the API.") + @operationId("ApiOperation_Delete") delete is ArmResourceDeleteSync< OperationContract, { @@ -68,7 +84,10 @@ interface ApiOperation { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of the operations for the specified API.") + @operationId("ApiOperation_ListByApi") listByApi is ArmResourceListByParent< OperationContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp index 20957f0005..14b6d3ad32 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PolicyContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./OperationContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Policy Contract details.") @@ -21,8 +23,10 @@ model PolicyContract is ProxyResource { } @armResourceOperations -interface ApiOperationPolicy { +interface PolicyContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the policy configuration at the API Operation level.") + @operationId("ApiOperationPolicy_Get") get is ArmResourceRead< PolicyContract, { @@ -30,18 +34,24 @@ interface ApiOperationPolicy { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the API operation policy specified by its identifier.") @head + @operationId("ApiOperationPolicy_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PolicyContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates policy configuration for the API Operation level.") + @operationId("ApiOperationPolicy_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PolicyContract, { @@ -52,7 +62,10 @@ interface ApiOperationPolicy { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the policy configuration at the Api Operation.") + @operationId("ApiOperationPolicy_Delete") delete is ArmResourceDeleteSync< PolicyContract, { @@ -63,6 +76,9 @@ interface ApiOperationPolicy { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the list of policy configuration at the API Operation level.") + @operationId("ApiOperationPolicy_ListByOperation") listByOperation is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp index aaeff5891b..5de9038dc1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalDelegationSettings.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Delegation settings for a developer portal.") @@ -15,24 +17,33 @@ namespace Azure.ResourceManager.ApiManagement; @parentResource(ApiManagementServiceResource) model PortalDelegationSettings is ProxyResource { - @key("delegation") + @key("portalsetting") @segment("portalsettings") name: string; } @armResourceOperations -interface DelegationSettings { +@projectedName("client", "PortalDelegationSettings") +interface PortalDelegationSettingsOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Delegation Settings for the Portal.") + @operationId("DelegationSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the DelegationSettings.") @head + @operationId("DelegationSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalDelegationSettings, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update Delegation settings.") + @operationId("DelegationSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalDelegationSettings, { @@ -43,10 +54,13 @@ interface DelegationSettings { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update Delegation settings.") - update is ArmResourcePatchSync< + @operationId("DelegationSettings_Update") + update is ArmCustomPatchSync< + PortalDelegationSettings, PortalDelegationSettings, - PortalDelegationSettingsProperties, { ...BaseParameters; @@ -55,16 +69,18 @@ interface DelegationSettings { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists a collection of portalsettings defined within a service instance..") + @operationId("PortalSettings_ListByService") + listByService is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the secret validation key of the DelegationSettings.") + @operationId("DelegationSettings_ListSecrets") listSecrets is ArmResourceActionSync< PortalDelegationSettings, void, PortalSettingValidationKeyContract >; } - -@armResourceOperations -interface PortalSettings { - @doc("Lists a collection of portalsettings defined within a service instance..") - listByService is ArmResourceListByParent; -} diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp index 90ec667f1b..325294ff3f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalRevisionContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Portal Revision's contract details.") @@ -24,32 +26,51 @@ model PortalRevisionContract } @armResourceOperations -interface PortalRevision { +interface PortalRevisionContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the developer portal's revision specified by its identifier.") + @operationId("PortalRevision_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the developer portal revision specified by its identifier.") @head + @operationId("PortalRevision_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalRevisionContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new developer portal's revision by running the portal's publishing. The `isCurrent` property indicates if the revision is publicly accessible.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("PortalRevision_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + PortalRevisionContract, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the description of specified portal revision or makes it current.") - update is ArmResourcePatchAsync< + @operationId("PortalRevision_Update") + update is ArmCustomPatchAsync< + PortalRevisionContract, PortalRevisionContract, - PortalRevisionContractProperties, { ...BaseParameters; @doc("ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.") @header `If-Match`: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists developer portal's revisions.") + @operationId("PortalRevision_ListByService") listByService is ArmResourceListByParent< PortalRevisionContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp index 20c8d900f3..ed77817ff6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSigninSettings.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,30 +9,40 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Sign-In settings for the Developer Portal.") @singleton("signin") @parentResource(ApiManagementServiceResource) model PortalSigninSettings is ProxyResource { - @key("signin") + @key("portalsetting") @segment("portalsettings") name: string; } @armResourceOperations -interface SignInSettings { +@projectedName("client", "PortalSigninSettings") +interface PortalSigninSettingsOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Sign In Settings for the Portal") + @operationId("SignInSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the SignInSettings.") @head + @operationId("SignInSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSigninSettings, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update Sign-In settings.") + @operationId("SignInSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSigninSettings, { @@ -42,10 +53,13 @@ interface SignInSettings { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update Sign-In settings.") - update is ArmResourcePatchSync< + @operationId("SignInSettings_Update") + update is ArmCustomPatchSync< + PortalSigninSettings, PortalSigninSettings, - PortalSigninSettingProperties, { ...BaseParameters; @@ -54,10 +68,9 @@ interface SignInSettings { `If-Match`: string; } >; -} -@armResourceOperations -interface PortalSettings { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of portalsettings defined within a service instance..") + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp index da59323ae8..a8a7af6a45 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PortalSignupSettings.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,30 +9,40 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Sign-Up settings for a developer portal.") @singleton("signup") @parentResource(ApiManagementServiceResource) model PortalSignupSettings is ProxyResource { - @key("signup") + @key("portalsetting") @segment("portalsettings") name: string; } @armResourceOperations -interface SignUpSettings { +@projectedName("client", "PortalSignupSettings") +interface PortalSignupSettingsOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Sign Up Settings for the Portal") + @operationId("SignUpSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the SignUpSettings.") @head + @operationId("SignUpSettings_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< PortalSignupSettings, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create or Update Sign-Up settings.") + @operationId("SignUpSettings_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< PortalSignupSettings, { @@ -42,10 +53,13 @@ interface SignUpSettings { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update Sign-Up settings.") - update is ArmResourcePatchSync< + @operationId("SignUpSettings_Update") + update is ArmCustomPatchSync< + PortalSignupSettings, PortalSignupSettings, - PortalSignupSettingsProperties, { ...BaseParameters; @@ -54,10 +68,9 @@ interface SignUpSettings { `If-Match`: string; } >; -} -@armResourceOperations -interface PortalSettings { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of portalsettings defined within a service instance..") + @operationId("PortalSettings_ListByService") listByService is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp index 35f161ae69..716bbd25cf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("The Private Endpoint Connection resource.") @@ -22,13 +24,24 @@ model PrivateEndpointConnection } @armResourceOperations -interface PrivateEndpointConnection { +interface PrivateEndpointConnections { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the Private Endpoint Connection specified by its identifier.") + @operationId("PrivateEndpointConnection_GetByName") getByName is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new Private Endpoint Connection or updates an existing one.") + @operationId("PrivateEndpointConnection_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified Private Endpoint Connection.") + @operationId("PrivateEndpointConnection_Delete") delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all private endpoint connections of the API Management service instance.") + @operationId("PrivateEndpointConnection_ListByService") listByService is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp index 3e381b6a94..21514c50d8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/PrivateLinkResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("A private link resource") @@ -21,9 +23,14 @@ model PrivateLinkResource is ProxyResource { } @armResourceOperations -interface PrivateEndpointConnection { +interface PrivateLinkResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the private link resources") + @operationId("PrivateEndpointConnection_GetPrivateLinkResource") getPrivateLinkResource is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the private link resources") + @operationId("PrivateEndpointConnection_ListPrivateLinkResources") listPrivateLinkResources is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp index 0cf3757c56..7d0436f34f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/ProductContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Product details.") @@ -23,18 +25,26 @@ model ProductContract is ProxyResource { } @armResourceOperations -interface Product { +interface ProductContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the product specified by its identifier.") + @operationId("Product_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the product specified by its identifier.") @head + @operationId("Product_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< ProductContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a product.") + @operationId("Product_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< ProductContract, { @@ -45,10 +55,13 @@ interface Product { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update existing product details.") - update is ArmResourcePatchSync< + @operationId("Product_Update") + update is ArmCustomPatchSync< ProductContract, - ProductContractProperties, + ProductUpdateParameters, { ...BaseParameters; @@ -57,7 +70,10 @@ interface Product { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete product.") + @operationId("Product_Delete") delete is ArmResourceDeleteSync< ProductContract, { @@ -72,7 +88,10 @@ interface Product { deleteSubscriptions?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of products in the specified service instance.") + @operationId("Product_ListByService") listByService is ArmResourceListByParent< ProductContract, { @@ -100,11 +119,11 @@ interface Product { tags?: string; } >; -} -@armResourceOperations -interface ProductApi { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductApi_ListByProduct") @doc("Lists a collection of the APIs associated with a product.") + // FIXME: ProductApi_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/apis") @get ListByProduct is Azure.Core.Foundations.Operation< @@ -145,11 +164,11 @@ interface ProductApi { }, ApiManagementProductApiListResult >; -} -@armResourceOperations -interface ProductGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductGroup_ListByProduct") @doc("Lists the collection of developer groups associated with the specified product.") + // FIXME: ProductGroup_ListByProduct could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/groups") @get ListByProduct is Azure.Core.Foundations.Operation< @@ -190,11 +209,11 @@ interface ProductGroup { }, ApiManagementProductGroupListResult >; -} -@armResourceOperations -interface ProductSubscriptions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("ProductSubscriptions_List") @doc("Lists the collection of subscriptions to the specified product.") + // FIXME: ProductSubscriptions_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/products/{productId}/subscriptions") @get List is Azure.Core.Foundations.Operation< @@ -233,6 +252,6 @@ interface ProductSubscriptions { @path subscriptionId: string; }, - SubscriptionListResult + ResourceListResult >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp index a1234185e1..b722bce933 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SchemaContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("API Schema Contract details.") @@ -23,18 +25,26 @@ model SchemaContract is ProxyResource { } @armResourceOperations -interface ApiSchema { +interface SchemaContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the schema configuration at the API level.") + @operationId("ApiSchema_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the schema specified by its identifier.") @head + @operationId("ApiSchema_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SchemaContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates schema configuration for the API.") + @operationId("ApiSchema_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< SchemaContract, { @@ -43,9 +53,13 @@ interface ApiSchema { @doc("ETag of the Entity. Not required when creating an entity, but required when updating an entity.") @header `If-Match`?: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the schema configuration at the Api.") + @operationId("ApiSchema_Delete") delete is ArmResourceDeleteSync< SchemaContract, { @@ -60,7 +74,10 @@ interface ApiSchema { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get the schema configuration at the API level.") + @operationId("ApiSchema_ListByApi") listByApi is ArmResourceListByParent< SchemaContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp index ae6f58e442..282b8d4ccc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/SubscriptionContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Subscription details.") @@ -21,18 +23,26 @@ model SubscriptionContract is ProxyResource { } @armResourceOperations -interface Subscription { +interface SubscriptionContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the specified Subscription entity.") + @operationId("Subscription_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier.") @head + @operationId("Subscription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< SubscriptionContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates the subscription of specified user to the specified product.") + @operationId("Subscription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< SubscriptionContract, { @@ -55,10 +65,13 @@ Notify change in Subscription State. appType?: AppType; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of a subscription specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("Subscription_Update") + update is ArmCustomPatchSync< SubscriptionContract, - SubscriptionContractProperties, + SubscriptionUpdateParameters, { ...BaseParameters; @@ -79,7 +92,10 @@ Notify change in Subscription State. appType?: AppType; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the specified subscription.") + @operationId("Subscription_Delete") delete is ArmResourceDeleteSync< SubscriptionContract, { @@ -90,7 +106,10 @@ Notify change in Subscription State. `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all subscriptions of the API Management service instance.") + @operationId("Subscription_List") list is ArmResourceListByParent< SubscriptionContract, { @@ -110,17 +129,26 @@ Notify change in Subscription State. $skip?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerates primary key of existing subscription of the API Management service instance.") + @operationId("Subscription_RegeneratePrimaryKey") regeneratePrimaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Regenerates secondary key of existing subscription of the API Management service instance.") + @operationId("Subscription_RegenerateSecondaryKey") regenerateSecondaryKey is ArmResourceActionNoContentSync< SubscriptionContract, void >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the specified Subscription keys.") + @operationId("Subscription_ListSecrets") listSecrets is ArmResourceActionSync< SubscriptionContract, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp index a097bb29b8..441988134a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./OperationContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Tag Contract details.") @@ -24,19 +26,33 @@ model TagContract is ProxyResource { } @armResourceOperations -interface Tag { +interface TagContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tag associated with the Operation.") + @operationId("Tag_GetByOperation") getByOperation is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state version of the tag specified by its identifier.") @head + @operationId("Tag_GetEntityStateByOperation") getEntityStateByOperation( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Assign tag to the Operation.") + @operationId("Tag_AssignToOperation") assignToOperation is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Detach the tag from the Operation.") + @operationId("Tag_DetachFromOperation") detachFromOperation is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all Tags associated with the Operation.") + @operationId("Tag_ListByOperation") listByOperation is ArmResourceListByParent< TagContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp index 83ebe38e74..9df7604a21 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TagDescriptionContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiContract.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Contract details.") @@ -25,18 +27,26 @@ model TagDescriptionContract } @armResourceOperations -interface ApiTagDescription { +interface TagDescriptionContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get Tag description in scope of API") + @operationId("ApiTagDescription_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state version of the tag specified by its identifier.") @head + @operationId("ApiTagDescription_GetEntityTag") getEntityTag( ...ResourceInstanceParameters< TagDescriptionContract, BaseParameters >, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create/Update tag description in scope of the Api.") + @operationId("ApiTagDescription_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< TagDescriptionContract, { @@ -47,7 +57,10 @@ interface ApiTagDescription { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete tag description for the Api.") + @operationId("ApiTagDescription_Delete") delete is ArmResourceDeleteSync< TagDescriptionContract, { @@ -58,7 +71,10 @@ interface ApiTagDescription { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations") + @operationId("ApiTagDescription_ListByService") listByService is ArmResourceListByParent< TagDescriptionContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp index 264031e060..77ba366ca5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/TenantSettingsContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("Tenant Settings.") @@ -22,10 +24,15 @@ model TenantSettingsContract } @armResourceOperations -interface TenantSettings { +interface TenantSettingsContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get tenant settings.") + @operationId("TenantSettings_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Public settings.") + @operationId("TenantSettings_ListByService") listByService is ArmResourceListByParent< TenantSettingsContract, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp index 22a10aaa7e..b06eb8163a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/UserContract.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./ApiManagementServiceResource.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Azure.ResourceManager.ApiManagement; @doc("User details.") @@ -23,15 +25,23 @@ model UserContract is ProxyResource { } @armResourceOperations -interface User { +interface UserContracts { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the details of the user specified by its identifier.") + @operationId("User_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the entity state (Etag) version of the user specified by its identifier.") @head + @operationId("User_GetEntityTag") getEntityTag( ...ResourceInstanceParameters>, ): OkResponse | ErrorResponse; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or Updates a user.") + @operationId("User_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrReplaceSync< UserContract, { @@ -46,10 +56,13 @@ interface User { `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates the details of the user specified by its identifier.") - update is ArmResourcePatchSync< + @operationId("User_Update") + update is ArmCustomPatchSync< UserContract, - UserContractProperties, + UserUpdateParameters, { ...BaseParameters; @@ -58,7 +71,10 @@ interface User { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes specific user.") + @operationId("User_Delete") delete is ArmResourceDeleteSync< UserContract, { @@ -81,7 +97,10 @@ interface User { appType?: AppType; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists a collection of registered users in the specified service instance.") + @operationId("User_ListByService") listByService is ArmResourceListByParent< UserContract, { @@ -105,23 +124,28 @@ interface User { expandGroups?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal.") + @operationId("User_GenerateSsoUrl") generateSsoUrl is ArmResourceActionSync< UserContract, void, GenerateSsoUrlResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the Shared Access Authorization Token for the User.") + @operationId("User_GetSharedAccessToken") getSharedAccessToken is ArmResourceActionSync< UserContract, UserTokenParameters, UserTokenResult >; -} -@armResourceOperations -interface UserConfirmationPassword { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sends confirmation") + @operationId("UserConfirmationPassword_Send") send is ArmResourceActionNoContentSync< UserContract, void, @@ -133,11 +157,11 @@ interface UserConfirmationPassword { appType?: AppType; } >; -} -@armResourceOperations -interface UserGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserGroup_List") @doc("Lists all user groups.") + // FIXME: UserGroup_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/groups") @get List is Azure.Core.Foundations.Operation< @@ -176,13 +200,13 @@ interface UserGroup { @path subscriptionId: string; }, - GroupListResult + ResourceListResult >; -} -@armResourceOperations -interface UserIdentities { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("UserIdentities_List") @doc("List of all user identities.") + // FIXME: UserIdentities_List could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/users/{userId}/identities") @get List is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json new file mode 100644 index 0000000000..318fc0d44e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_CreateOrUpdate.json @@ -0,0 +1,162 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "parameters": { + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + } + }, + "201": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + } + } + }, + "operationId": "ApiDiagnostic_CreateOrUpdate", + "title": "ApiManagementCreateApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json new file mode 100644 index 0000000000..27edadd8a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiDiagnostic_Delete", + "title": "ApiManagementDeleteApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json new file mode 100644 index 0000000000..dc1b097ae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Get.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "httpCorrelationProtocol": "Legacy", + "logClientIp": true, + "loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest", + "sampling": { + "percentage": 100, + "samplingType": "fixed" + } + } + } + } + }, + "operationId": "ApiDiagnostic_Get", + "title": "ApiManagementGetApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json new file mode 100644 index 0000000000..d25c8da044 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "diagnosticId": "applicationinsights", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiDiagnostic_GetEntityTag", + "title": "ApiManagementHeadApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json new file mode 100644 index 0000000000..5c7b99f5be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_ListByService.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "httpCorrelationProtocol": "Legacy", + "logClientIp": true, + "loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest", + "sampling": { + "percentage": 100, + "samplingType": "fixed" + } + } + } + ] + } + } + }, + "operationId": "ApiDiagnostic_ListByService", + "title": "ApiManagementListApiDiagnostics" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json new file mode 100644 index 0000000000..25b0e586b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiDiagnostic_Update.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "diagnosticId": "applicationinsights", + "parameters": { + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + }, + "request": { + "body": { + "bytes": 512 + }, + "headers": [ + "Content-type" + ] + } + }, + "loggerId": "/loggers/applicationinsights", + "sampling": { + "percentage": 50, + "samplingType": "fixed" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/apis/diagnostics", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/diagnostics/applicationinsights", + "properties": { + "alwaysLog": "allErrors", + "backend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "frontend": { + "response": { + "body": { + "bytes": 100 + }, + "headers": [] + }, + "request": { + "body": { + "bytes": 100 + }, + "headers": [] + } + }, + "httpCorrelationProtocol": "Legacy", + "logClientIp": true, + "loggerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/aisamplingtest", + "sampling": { + "percentage": 100, + "samplingType": "fixed" + } + } + } + } + }, + "operationId": "ApiDiagnostic_Update", + "title": "ApiManagementUpdateApiDiagnostic" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json new file mode 100644 index 0000000000..c42d3baacc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "content": "IEJhc2U2NA==", + "contentFormat": "image/jpeg", + "title": "Issue attachment." + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + }, + "201": { + "body": { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + } + }, + "operationId": "ApiIssueAttachment_CreateOrUpdate", + "title": "ApiManagementCreateApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json new file mode 100644 index 0000000000..6d2f3138b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiIssueAttachment_Delete", + "title": "ApiManagementDeleteApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json new file mode 100644 index 0000000000..7c03ed4838 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + } + }, + "operationId": "ApiIssueAttachment_Get", + "title": "ApiManagementGetApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json new file mode 100644 index 0000000000..eb2422dd0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_GetEntityTag.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "attachmentId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiIssueAttachment_GetEntityTag", + "title": "ApiManagementHeadApiIssueAttachment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json new file mode 100644 index 0000000000..881975a357 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueAttachment_ListByService.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57d2ef278aa04f0888cba3f3", + "type": "Microsoft.ApiManagement/service/apis/issues/attachments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3", + "properties": { + "content": "https://.../image.jpg", + "contentFormat": "link", + "title": "Issue attachment." + } + } + ] + } + } + }, + "operationId": "ApiIssueAttachment_ListByService", + "title": "ApiManagementListApiIssueAttachments" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json new file mode 100644 index 0000000000..25a397ad38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + }, + "201": { + "body": { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssueComment_CreateOrUpdate", + "title": "ApiManagementCreateApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json new file mode 100644 index 0000000000..aaa4c3a63b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiIssueComment_Delete", + "title": "ApiManagementDeleteApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json new file mode 100644 index 0000000000..6d4d0a534b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssueComment_Get", + "title": "ApiManagementGetApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json new file mode 100644 index 0000000000..c44e7f2ab4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_GetEntityTag.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "commentId": "599e29ab193c3c0bd0b3e2fb", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiIssueComment_GetEntityTag", + "title": "ApiManagementHeadApiIssueComment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json new file mode 100644 index 0000000000..316bcb1a1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssueComment_ListByService.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "599e29ab193c3c0bd0b3e2fb", + "type": "Microsoft.ApiManagement/service/apis/issues/comments", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/comments/599e29ab193c3c0bd0b3e2fb", + "properties": { + "createdDate": "2018-02-01T22:21:20.467Z", + "text": "Issue comment.", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + ] + } + } + }, + "operationId": "ApiIssueComment_ListByService", + "title": "ApiManagementListApiIssueComments" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json new file mode 100644 index 0000000000..564372ac5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "description": "New API issue description", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + }, + "201": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssue_CreateOrUpdate", + "title": "ApiManagementCreateApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json new file mode 100644 index 0000000000..a390fb7494 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiIssue_Delete", + "title": "ApiManagementDeleteApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json new file mode 100644 index 0000000000..b68e3d3a81 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Get.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "apiId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssue_Get", + "title": "ApiManagementGetApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json new file mode 100644 index 0000000000..32679c3024 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiIssue_GetEntityTag", + "title": "ApiManagementHeadApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json new file mode 100644 index 0000000000..aedf0ac964 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_ListByService.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "apiId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + ] + } + } + }, + "operationId": "ApiIssue_ListByService", + "title": "ApiManagementListApiIssues" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json new file mode 100644 index 0000000000..b12b0b4a07 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiIssue_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "issueId": "57d2ef278aa04f0ad01d6cdc", + "parameters": { + "properties": { + "state": "closed" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/issues", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc", + "properties": { + "description": "New API issue description", + "apiId": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "createdDate": "2018-02-01T22:21:20.467Z", + "state": "open", + "title": "New API issue", + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + } + } + } + }, + "operationId": "ApiIssue_Update", + "title": "ApiManagementUpdateApiIssue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json new file mode 100644 index 0000000000..20f593cb73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsConsumption.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "capacity": null, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Consumption" + } + } + ] + } + } + }, + "operationId": "ApiManagementServiceSkus_ListAvailableServiceSkus", + "title": "ApiManagementListSKUs-Consumption" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json new file mode 100644 index 0000000000..5958e6ac61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementServiceSkus_ListAvailableServiceSkus_ApiManagementListSkUsDedicated.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "none" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Developer" + } + }, + { + "capacity": { + "default": 1, + "maximum": 2, + "minimum": 1, + "scaleType": "manual" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Basic" + } + }, + { + "capacity": { + "default": 1, + "maximum": 4, + "minimum": 1, + "scaleType": "automatic" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Standard" + } + }, + { + "capacity": { + "default": 1, + "maximum": 10, + "minimum": 1, + "scaleType": "automatic" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Premium" + } + }, + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "automatic" + }, + "resourceType": "Microsoft.ApiManagement/service", + "sku": { + "name": "Isolated" + } + } + ] + } + } + }, + "operationId": "ApiManagementServiceSkus_ListAvailableServiceSkus", + "title": "ApiManagementListSKUs-Dedicated" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json new file mode 100644 index 0000000000..0dbbca88a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ApplyNetworkConfigurationUpdates.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "west us" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAXX6Y=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "East Asia", + "properties": { + "createdAtUtc": "2015-09-22T01:50:34.7921566Z", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "207.46.155.24" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/eastUsVirtualNetwork/subnets/apimSubnet" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "UID": "52ed5986-717b-45b4-b17c-3df8db372cff" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_ApplyNetworkConfigurationUpdates", + "title": "ApiManagementApplyNetworkConfigurationUpdates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json new file mode 100644 index 0000000000..92e53a3f52 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithAccessKey.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessKey": "**************************************************", + "accessType": "AccessKey", + "backupName": "apimService1backup_2017_03_19", + "containerName": "backupContainer", + "storageAccount": "teststorageaccount" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXok=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net", + "location": "East US", + "publicIPAddresses": [ + "23.101.138.153" + ], + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T06:26:20.3348609Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.91.32.113" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Backup", + "title": "ApiManagementBackupWithAccessKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json new file mode 100644 index 0000000000..89e9010170 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithSystemManagedIdentity.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessType": "SystemAssignedManagedIdentity", + "backupName": "backup5", + "containerName": "apim-backups", + "storageAccount": "contosorpstorage" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAQM8o=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "XXXXX-5fb4-4916-95d4-64b306f9d924", + "tenantId": "XXXXX-86f1-XXXXX-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": { + "clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2", + "principalId": "XXXXX-a100-4478-XXXX-d65d98118ba0" + }, + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": { + "clientId": "XXXX-6328-4db2-XXXX-ab0e3e7806cf", + "principalId": "XXXXX-9208-4128-af2d-a10d2af9b5a3" + } + } + }, + "location": "Central US EUAP", + "properties": { + "createdAtUtc": "2020-04-23T16:26:47.8637967Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-centraluseuap-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv1", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "52.XXXX.160.66" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "apimService1@corp.microsoft.com", + "publisherName": "MS", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "lastModifiedAt": "2021-06-30T06:24:57.0008037Z", + "lastModifiedBy": "contoso@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": { + "Owner": "apimService1" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Backup", + "title": "ApiManagementBackupWithSystemManagedIdentity" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json new file mode 100644 index 0000000000..6bf30fcf6f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Backup_ApiManagementBackupWithUserAssignedManagedIdentity.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessType": "UserAssignedManagedIdentity", + "backupName": "backup5", + "clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2", + "containerName": "apim-backups", + "storageAccount": "contosorpstorage" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAQM8o=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "XXXXX-5fb4-4916-95d4-64b306f9d924", + "tenantId": "XXXXX-86f1-XXXXX-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/rg1UserIdentity": { + "clientId": "XXXXX-a154-4830-XXXX-46a12da1a1e2", + "principalId": "XXXXX-a100-4478-XXXX-d65d98118ba0" + }, + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/vpnpremium": { + "clientId": "XXXX-6328-4db2-XXXX-ab0e3e7806cf", + "principalId": "XXXXX-9208-4128-af2d-a10d2af9b5a3" + } + } + }, + "location": "Central US EUAP", + "properties": { + "createdAtUtc": "2020-04-23T16:26:47.8637967Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-centraluseuap-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv1", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "52.XXXX.160.66" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "apimService1@corp.microsoft.com", + "publisherName": "MS", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "lastModifiedAt": "2021-06-30T06:24:57.0008037Z", + "lastModifiedBy": "contoso@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": { + "Owner": "apimService1" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Backup", + "title": "ApiManagementBackupWithUserAssignedManagedIdentity" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json new file mode 100644 index 0000000000..a9fb6419ad --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CheckNameAvailability.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "name": "apimService1" + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "message": "", + "nameAvailable": true, + "reason": "Valid" + } + } + }, + "operationId": "ApiManagementService_CheckNameAvailability", + "title": "ApiManagementServiceCheckNameAvailability" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json new file mode 100644 index 0000000000..0ef35180ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname.json @@ -0,0 +1,258 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "location": "East US", + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificatePassword": "Password", + "defaultSslBinding": true, + "encodedCertificate": "****** Base 64 Encoded Certificate ************", + "hostName": "gateway1.msitesting.net" + }, + { + "type": "Management", + "certificatePassword": "Password", + "encodedCertificate": "****** Base 64 Encoded Certificate ************", + "hostName": "mgmt.msitesting.net" + }, + { + "type": "Portal", + "certificatePassword": "Password", + "encodedCertificate": "****** Base 64 Encoded Certificate ************", + "hostName": "portal1.msitesting.net" + } + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXok=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net", + "location": "East US", + "publicIPAddresses": [ + "23.101.138.153" + ], + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T06:26:20.3348609Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.91.32.113" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXoo=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "location": "East US", + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T08:04:26.9492661Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXF1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateMultiRegionServiceWithCustomHostname" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json new file mode 100644 index 0000000000..b391d4ccaf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateService.json @@ -0,0 +1,143 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "South Central US", + "properties": { + "publisherEmail": "foo@contoso.com", + "publisherName": "foo" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3T4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-southcentralus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "23.102.171.124" + ], + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3P0=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "Name": "Contoso", + "Test": "User" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/c2RrdGVzdGFwaW0xNTkxX0FjdF9jZTkyMmNmOQ==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json new file mode 100644 index 0000000000..55af44d10e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceHavingMsi.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAAWiU=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned", + "principalId": "dfb9a757-df69-4966-a8d0-711a9cd8ffb4", + "tenantId": "XXXXXX-86f1-41af-91ab-2d7cd011db47" + }, + "location": "West US", + "properties": { + "createdAtUtc": "2019-04-11T16:29:29.9711098Z", + "enableClientCertificate": false, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "mtv1", + "provisioningState": "Succeeded", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAAWiE=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned", + "principalId": "dfb9a757-df69-4966-a8d0-711a9cd8ffb4", + "tenantId": "XXXXXX-86f1-41af-91ab-2d7cd011db47" + }, + "location": "West US", + "properties": { + "createdAtUtc": "2019-04-11T16:29:29.9711098Z", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceHavingMsi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json new file mode 100644 index 0000000000..e37570d558 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIp.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "East US 2 EUAP", + "properties": { + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAGTAs=", + "id": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.ApiManagement/service/apimService1", + "location": "East US 2 EUAP", + "properties": { + "createdAtUtc": "2021-02-22T06:53:46.6409875Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-eastus2euap-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "20.47.137.XXX" + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAiXto=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "East US 2 EUAP", + "properties": { + "createdAtUtc": "2020-07-28T23:18:14.6562474Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/publicIPAddresses/apimazvnet", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rgName/providers/Microsoft.Network/virtualNetworks/apimcus/subnets/tenant" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceInVnetWithPublicIP" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json new file mode 100644 index 0000000000..d65df2a42a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceInZones.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "North europe", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAiXvE=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "North Europe", + "properties": { + "createdAtUtc": "2020-07-28T23:18:14.6562474Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-northeurope-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "20.54.34.66" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAiXto=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "North Europe", + "properties": { + "createdAtUtc": "2020-07-28T23:18:14.6562474Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 2 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + }, + "zones": [ + "1", + "2" + ] + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceInZones" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json new file mode 100644 index 0000000000..63eaf3eccc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKeyVault.json @@ -0,0 +1,284 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "North Europe", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + "type": "Management", + "hostName": "mgmt.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + { + "type": "Portal", + "hostName": "portal1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + } + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAigjU=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "tenantId": "f686d426-8d16-xxxx-xxxx-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": { + "clientId": "329419bc-adec-4dce-9568-25a6d486e468", + "principalId": "15e769b2-xxxx-xxxx-xxxx-3fd9a923ac3a" + } + } + }, + "location": "North Europe", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2020-09-13T22:30:20.7759747Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-northeurope-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.112.74.192" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAigi8=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "North Europe", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2020-09-13T22:30:20.7759747Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2037-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "EA276907917CB5XXXXXXXXXXX690" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "identityClientId": "329419bc-adec-4dce-9568-25a6d486e468", + "keyVaultId": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceWithCustomHostnameKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json new file mode 100644 index 0000000000..00268085b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates.json @@ -0,0 +1,175 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "Central US", + "properties": { + "certificates": [ + { + "certificatePassword": "Password", + "encodedCertificate": "*******Base64 encoded Certificate******************", + "storeName": "CertificateAuthority" + } + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Basic", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3UM=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "Central US", + "properties": { + "apiVersionConstraint": {}, + "certificates": [ + { + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989652CABCF585ACBFCB9C2C91F1D174FDB3A2" + }, + "storeName": "CertificateAuthority" + } + ], + "createdAtUtc": "2019-12-18T06:33:28.0906918Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-centralus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.113.223.117" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Basic", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3TM=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "Central US", + "properties": { + "apiVersionConstraint": {}, + "certificates": [ + { + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989652CABCF585ACBFCB9C2C91F1D174FDB3A2" + }, + "storeName": "CertificateAuthority" + } + ], + "createdAtUtc": "2019-12-18T06:33:28.0906918Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Basic", + "capacity": 1 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/bXVsdGlob3N0bmFtZW11bHRpcmVnaW9uc2VydmljZV9BY3RfZjFiOTZhMjc=?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceWithSystemCertificates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json new file mode 100644 index 0000000000..b4b01b1135 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity.json @@ -0,0 +1,158 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + "location": "West US", + "properties": { + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAFzyk=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "tenantId": "XXXXX-86f1-41af-XXXX-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "clientId": "5a2c6b8e-0905-XXXX-a772-993c9418137f", + "principalId": "XXXXX-6e62-4649-9f54-a119fc1ba85e" + } + } + }, + "location": "West US", + "properties": { + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "disableGateway": false, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "mtv1", + "provisioningState": "Succeeded", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAFzyQ=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": {} + } + }, + "location": "West US", + "properties": { + "createdAtUtc": "2020-03-12T01:05:33.4573398Z", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "mtv1", + "provisioningState": "Created", + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "systemData": { + "createdAt": "2020-02-01T01:01:01.1075056Z", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-02-02T02:03:01.1974346Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementCreateServiceWithUserAssignedIdentity" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json new file mode 100644 index 0000000000..d8618c01ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_CreateOrUpdate_ApiManagementUndelete.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "location": "South Central US", + "properties": { + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "restore": true + }, + "sku": { + "name": "Developer", + "capacity": 1 + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3T4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-southcentralus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "23.102.171.124" + ], + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + } + } + }, + "201": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAp3P0=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "South Central US", + "properties": { + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-18T06:10:56.0327105Z", + "disableGateway": false, + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": true, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Created", + "publisherEmail": "foo@contoso.com", + "publisherName": "foo", + "targetProvisioningState": "Activating", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Developer", + "capacity": 1 + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/c2RrdGVzdGFwaW0xNTkxX0FjdF9jZTkyMmNmOQ==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_CreateOrUpdate", + "title": "ApiManagementUndelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json new file mode 100644 index 0000000000..fa7b3b728c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Delete.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAFfhHY=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2016-12-20T19:41:21.5823069Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True" + }, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.XX.XXX.168" + ], + "publisherEmail": "contoso@live.com", + "publisherName": "Microsoft", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "Deleting", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/BlockVNETSamir/subnets/default" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Developer", + "capacity": 1 + }, + "tags": {} + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-08-01" + } + }, + "204": {} + }, + "operationId": "ApiManagementService_Delete", + "title": "ApiManagementServiceDeleteService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json new file mode 100644 index 0000000000..395e7e1ebb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_GetSsoToken.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "redirectUri": "https://apimService1.portal.azure-api.net:443/signin-sso?token=1%26201705301929%26eIkr3%2fnfaLs1GVJ0OVbzkJjAcwPFkEZAPM8VUXvXPf7cJ6lWsB9oUwsk2zln9x0KLkn21txCPJWWheSPq7SNeA%3d%3d" + } + } + }, + "operationId": "ApiManagementService_GetSsoToken", + "title": "ApiManagementServiceGetSsoToken" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json new file mode 100644 index 0000000000..19b8c40720 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetMultiRegionInternalVnet.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimservice1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAADqC0c=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimservice1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://apimservice1-westus2-01.regional.azure-api.net", + "location": "West US 2", + "privateIPAddresses": [ + "10.0.X.6" + ], + "publicIPAddresses": [ + "40.XXX.79.187" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/APIMVNet/subnets/apim-internal-sub" + } + } + ], + "apiVersionConstraint": {}, + "createdAtUtc": "2019-12-02T01:42:09.1268424Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimservice1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimservice1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2019-08-16T16:51:34+00:00", + "subject": "CN=*.preview.net", + "thumbprint": "B4330123DBAXXXXXXXXX1F35E84493476" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "apimgatewaytest.preview.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimservice1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimservice1.portal.azure-api.net", + "privateIPAddresses": [ + "172.XX.0.5" + ], + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "137.XXX.11.74" + ], + "publisherEmail": "abcs@contoso.com", + "publisherName": "contoso publisher", + "scmUrl": "https://apimservice1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apim-appGateway-vnet/subnets/apim-subnet" + }, + "virtualNetworkType": "Internal" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": {} + } + } + }, + "operationId": "ApiManagementService_Get", + "title": "ApiManagementServiceGetMultiRegionInternalVnet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json new file mode 100644 index 0000000000..6d6d91f971 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetService.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "OGF-Z3-06162021-Premium", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWN/4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "306205e7-b21a-41bf-92e2-3e28af30041e", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net", + "location": "East US 2", + "platformVersion": "stv2", + "publicIPAddresses": [ + "40.70.24.106" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [], + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-z3-06162021-premium.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-premium.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "ogf-z3-06162021-premium.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286XXXXXXXX58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "gateway.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault.azure.net/secrets/current-ssl", + "negotiateClientCertificate": true + }, + { + "type": "DeveloperPortal", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286XXXXXXXX58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "developer.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault.azure.net/secrets/current-ssl", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286XXXXXXXX58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "mgmt.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault.azure.net/secrets/current-ssl", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-premium.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://ogf-z3-06162021-premium.portal.azure-api.net", + "privateEndpointConnections": [ + { + "name": "privateEndpointProxyName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointProxyName", + "properties": { + "groupIds": [ + "Gateway" + ], + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + } + ], + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.92.130.49" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "string", + "publisherName": "Test Premium", + "scmUrl": "https://ogf-z3-06162021-premium.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2021-06-16T09:40:00.7106733Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User" + }, + "tags": { + "ReleaseName": "Z3", + "owner": "v-aswmoh" + } + } + } + }, + "operationId": "ApiManagementService_Get", + "title": "ApiManagementServiceGetService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json new file mode 100644 index 0000000000..2e20702170 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Get_ApiManagementServiceGetServiceHavingMsi.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAENfI=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "ca1d33f7-xxxx-42ec-xxxx-d526a1ee953a", + "tenantId": "72f988bf-xxxx-41af-xxxx-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/apimService1": { + "clientId": "aaff9c7d-xxxx-4db2-xxxx-ab0e3e7806cf", + "principalId": "95194df2-9208-xxxx-xxxx-a10d2af9b5a3" + } + } + }, + "location": "West Europe", + "properties": { + "createdAtUtc": "2016-04-12T00:20:15.6018952Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "True", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "True" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westeurope-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2020-12-18T11:11:47+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "9833D531D7A45XXXXXA85908BD3692E0BD3F" + }, + "certificateSource": "KeyVault", + "defaultSslBinding": true, + "hostName": "proxy.msitesting.net", + "keyVaultId": "https://samir-msi-keyvault.vault.azure.net/secrets/msicertificate", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.94.xxx.188" + ], + "publisherEmail": "foo@contoso.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/dfVirtualNetwork/subnets/backendSubnet" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": {} + } + } + }, + "operationId": "ApiManagementService_Get", + "title": "ApiManagementServiceGetServiceHavingMsi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json new file mode 100644 index 0000000000..7b42ea0808 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_List.json @@ -0,0 +1,357 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "OGF-Z3-06162021-Premium", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWN/4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "306205e7-b21a-41bf-92e2-3e28af30041e", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net", + "location": "East US 2", + "publicIPAddresses": [ + "40.70.24.106" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [], + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-z3-06162021-premium.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-premium.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "ogf-z3-06162021-premium.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "gateway.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": true + }, + { + "type": "DeveloperPortal", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "developer.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "mgmt.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-premium.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-premium.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.92.130.49" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Premium", + "scmUrl": "https://ogf-z3-06162021-premium.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2021-06-16T09:40:00.7106733Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User" + }, + "tags": { + "ReleaseName": "Z3", + "owner": "v-aswmoh" + } + }, + { + "name": "vvktestcons", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWKwo=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/vvktestcons", + "location": "East US", + "properties": { + "createdAtUtc": "2020-08-10T18:07:23.4565211Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "disableGateway": false, + "enableClientCertificate": false, + "gatewayUrl": "https://vvktestcons.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "vvktestcons.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "vvktestcons", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "Owner": "vitaliik" + } + }, + { + "name": "OGF-Z3-06162021-Standard", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWF7M=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Standard", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "347a5800-ca99-475a-9202-fe38ca79ee41", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "createdAtUtc": "2021-06-16T09:39:58.6555759Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "true", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://ogf-z3-06162021-standard.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-standard-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-standard.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-z3-06162021-standard.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-standard.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-standard.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.82.208.32" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Standard", + "scmUrl": "https://ogf-z3-06162021-standard.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 2 + }, + "systemData": { + "createdAt": "2021-06-16T09:39:58.4591834Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-17T15:05:13.5494721Z", + "lastModifiedBy": "bar@contoso.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "ogf-dev-060921", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWEFg=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/ogf-dev-060921", + "identity": { + "type": "SystemAssigned", + "principalId": "c9bd4c05-205e-4431-b232-112cf2e9e0aa", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd" + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-southcentralus-01.regional.azure-api.net", + "location": "South Central US", + "publicIPAddresses": [ + "13.84.208.29" + ], + "sku": { + "name": "Premium", + "capacity": 9 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [ + { + "certificate": { + "expiry": "2021-11-25T22:51:47+00:00", + "subject": "CN=*.apim.net", + "thumbprint": "4E8234312EC69245D1AE296C4882D46FB84076A3" + }, + "storeName": "Root" + } + ], + "createdAtUtc": "2021-06-09T10:06:22.2133978Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-dev-060921.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-dev-060921.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-dev-060921.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-dev-060921.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-dev-060921.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "168.62.39.172" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "v-ssaiprasan@microsoft.com", + "publisherName": "TechM", + "scmUrl": "https://ogf-dev-060921.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "systemData": { + "createdAt": "2021-06-09T10:06:21.7336597Z", + "createdBy": "v-ssaiprasan@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-10T14:27:05.546816Z", + "lastModifiedBy": "v-ssaiprasan@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "ApiManagementService_List", + "title": "ApiManagementListServiceBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json new file mode 100644 index 0000000000..a1bbb3c903 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_ListByResourceGroup.json @@ -0,0 +1,358 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "OGF-Z3-06162021-Premium", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWN/4=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Premium", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "306205e7-b21a-41bf-92e2-3e28af30041e", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus2-01.regional.azure-api.net", + "location": "East US 2", + "publicIPAddresses": [ + "40.70.24.106" + ], + "sku": { + "name": "Premium", + "capacity": 1 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [], + "createdAtUtc": "2021-06-16T09:40:00.9453556Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-z3-06162021-premium.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-premium-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-premium.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "ogf-z3-06162021-premium.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": true, + "hostName": "gateway.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": true + }, + { + "type": "DeveloperPortal", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "developer.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2022-01-08T22:32:32+00:00", + "subject": "CN=*.current.int-azure-api.net, O=Microsoft Corporation, L=Redmond, S=WA, C=US", + "thumbprint": "BA0C286F71AF3B6A01BDB240C58A4A507E3DBD51" + }, + "certificateSource": "Custom", + "defaultSslBinding": false, + "hostName": "mgmt.current.int-azure-api.net", + "keyVaultId": "https://ogf-testing.vault-int.azure-int.net/secrets/current-ssl", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-premium.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-premium.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.92.130.49" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Premium", + "scmUrl": "https://ogf-z3-06162021-premium.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "systemData": { + "createdAt": "2021-06-16T09:40:00.7106733Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-20T06:33:09.6159006Z", + "lastModifiedBy": "foo@contoso.com", + "lastModifiedByType": "User" + }, + "tags": { + "ReleaseName": "Z3", + "owner": "v-aswmoh" + } + }, + { + "name": "vvktestcons", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWKwo=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/vvktestcons", + "location": "East US", + "properties": { + "createdAtUtc": "2020-08-10T18:07:23.4565211Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "disableGateway": false, + "enableClientCertificate": false, + "gatewayUrl": "https://vvktestcons.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "vvktestcons.azure-api.net", + "negotiateClientCertificate": false + } + ], + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "vvktestcons", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Consumption", + "capacity": 0 + }, + "tags": { + "Owner": "vitaliik" + } + }, + { + "name": "OGF-Z3-06162021-Standard", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWF7M=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/OGF-Z3-06162021-Standard", + "identity": { + "type": "SystemAssigned, UserAssigned", + "principalId": "347a5800-ca99-475a-9202-fe38ca79ee41", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd", + "userAssignedIdentities": { + "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/ogf-identity": { + "clientId": "8d9791f2-0cdf-41f4-9e66-cdc39b496789", + "principalId": "713784d2-ee37-412a-95f0-3768f397f82d" + } + } + }, + "location": "East US", + "properties": { + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "createdAtUtc": "2021-06-16T09:39:58.6555759Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "true", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://ogf-z3-06162021-standard.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-z3-06162021-standard-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-z3-06162021-standard.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-z3-06162021-standard.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-z3-06162021-standard.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-z3-06162021-standard.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.82.208.32" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "bar@contoso.com", + "publisherName": "Test Standard", + "scmUrl": "https://ogf-z3-06162021-standard.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 2 + }, + "systemData": { + "createdAt": "2021-06-16T09:39:58.4591834Z", + "createdBy": "bar@contoso.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-17T15:05:13.5494721Z", + "lastModifiedBy": "bar@contoso.com", + "lastModifiedByType": "User" + }, + "tags": {} + }, + { + "name": "ogf-dev-060921", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWEFg=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/ogf-dev-060921", + "identity": { + "type": "SystemAssigned", + "principalId": "c9bd4c05-205e-4431-b232-112cf2e9e0aa", + "tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd" + }, + "location": "East US", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-southcentralus-01.regional.azure-api.net", + "location": "South Central US", + "publicIPAddresses": [ + "13.84.208.29" + ], + "sku": { + "name": "Premium", + "capacity": 9 + }, + "zones": [] + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-12-01" + }, + "certificates": [ + { + "certificate": { + "expiry": "2021-11-25T22:51:47+00:00", + "subject": "CN=*.apim.net", + "thumbprint": "4E8234312EC69245D1AE296C4882D46FB84076A3" + }, + "storeName": "Root" + } + ], + "createdAtUtc": "2021-06-09T10:06:22.2133978Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://ogf-dev-060921.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://ogf-dev-060921-eastus-01.regional.azure-api.net", + "gatewayUrl": "https://ogf-dev-060921.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": true, + "hostName": "ogf-dev-060921.azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://ogf-dev-060921.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://ogf-dev-060921.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "168.62.39.172" + ], + "publicNetworkAccess": "Enabled", + "publisherEmail": "v-ssaiprasan@microsoft.com", + "publisherName": "TechM", + "scmUrl": "https://ogf-dev-060921.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "systemData": { + "createdAt": "2021-06-09T10:06:21.7336597Z", + "createdBy": "v-ssaiprasan@microsoft.com", + "createdByType": "User", + "lastModifiedAt": "2021-06-10T14:27:05.546816Z", + "lastModifiedBy": "v-ssaiprasan@microsoft.com", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "ApiManagementService_ListByResourceGroup", + "title": "ApiManagementListServiceBySubscriptionAndResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json new file mode 100644 index 0000000000..470c309a73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Restore.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "accessKey": "**************************************************", + "accessType": "AccessKey", + "backupName": "apimService1backup_2017_03_19", + "containerName": "backupContainer", + "storageAccount": "teststorageaccount" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAACXok=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "additionalLocations": [ + { + "disableGateway": true, + "gatewayRegionalUrl": "https://apimService1-eastus-01.regional.azure-api.net", + "location": "East US", + "publicIPAddresses": [ + "23.101.138.153" + ], + "sku": { + "name": "Premium", + "capacity": 1 + } + } + ], + "apiVersionConstraint": { + "minApiVersion": "2019-01-01" + }, + "createdAtUtc": "2019-12-18T06:26:20.3348609Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "False" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-westus-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": true, + "hostName": "gateway1.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Management", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "mgmt.msitesting.net", + "negotiateClientCertificate": false + }, + { + "type": "Portal", + "certificate": { + "expiry": "2036-01-01T07:00:00+00:00", + "subject": "CN=*.msitesting.net", + "thumbprint": "8E989XXXXXXXXXXXXXXXXB9C2C91F1D174FDB3A2" + }, + "defaultSslBinding": false, + "hostName": "portal1.msitesting.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "13.91.32.113" + ], + "publisherEmail": "apim@autorestsdk.com", + "publisherName": "autorestsdk", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Premium", + "capacity": 1 + }, + "tags": { + "tag1": "value1", + "tag2": "value2", + "tag3": "value3" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/dGVjaGVkX01hbmFnZVJvbGVfNWRiNGI3Ng==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Restore", + "title": "ApiManagementRestoreService" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json new file mode 100644 index 0000000000..a4e5bd501e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceDisableTls10.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "Owner": "sasolank", + "Pool": "Manual", + "Reserved": "", + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT", + "TestSuiteExpiration": "Thu, 29 Jun 2017 18:51:46 GMT", + "UID": "4f5025fe-0669-4e2e-8320-5199466e5eb3" + } + } + }, + "202": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT" + } + } + }, + "operationId": "ApiManagementService_Update", + "title": "ApiManagementUpdateServiceDisableTls10" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json new file mode 100644 index 0000000000..b14f4a7b14 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServicePublisherDetails.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "publisherEmail": "foobar@live.com", + "publisherName": "Contoso Vnext" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "foobar@live.com", + "publisherName": "Contoso Vnext", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "Owner": "sasolank", + "Pool": "Manual", + "Reserved": "", + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT", + "TestSuiteExpiration": "Thu, 29 Jun 2017 18:51:46 GMT", + "UID": "4f5025fe-0669-4e2e-8320-5199466e5eb3" + } + } + }, + "202": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAYRPs=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "West US", + "properties": { + "createdAtUtc": "2017-06-29T17:50:42.3191122Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "False" + }, + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "40.86.176.232" + ], + "publisherEmail": "admin@live.com", + "publisherName": "Contoso", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkType": "None" + }, + "sku": { + "name": "Standard", + "capacity": 1 + }, + "tags": { + "TestExpiration": "Thu, 29 Jun 2017 18:50:40 GMT" + } + } + }, + "operationId": "ApiManagementService_Update", + "title": "ApiManagementUpdateServicePublisherDetails" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json new file mode 100644 index 0000000000..7f18fecb71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiManagementService_Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones.json @@ -0,0 +1,163 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "additionalLocations": [ + { + "location": "Australia East", + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "sku": { + "name": "Premium", + "capacity": 3 + }, + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + "zones": [ + "1", + "2", + "3" + ] + } + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" + }, + "virtualNetworkType": "External" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "zones": [ + "1", + "2", + "3" + ] + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService1", + "type": "Microsoft.ApiManagement/service", + "etag": "AAAAAAAWBIU=", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1", + "location": "Japan East", + "properties": { + "additionalLocations": [ + { + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-australiaeast-01.regional.azure-api.net", + "location": "Australia East", + "platformVersion": "stv2", + "publicIPAddresses": [ + "20.213.1.35" + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/apim-australia-east-publicip", + "sku": { + "name": "Premium", + "capacity": 3 + }, + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/apimaeavnet/subnets/default" + }, + "zones": [ + "1", + "2", + "3" + ] + } + ], + "createdAtUtc": "2021-04-08T23:41:35.6447381Z", + "customProperties": { + "Microsoft.WindowsAzure.ApiManagement.Gateway.Protocols.Server.Http2": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Backend.Protocols.Tls11": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_CBC_SHA256": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_128_GCM_SHA256": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TLS_RSA_WITH_AES_256_CBC_SHA256": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Ciphers.TripleDes168": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Ssl30": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls10": "false", + "Microsoft.WindowsAzure.ApiManagement.Gateway.Security.Protocols.Tls11": "false" + }, + "developerPortalUrl": "https://apimService1.developer.azure-api.net", + "disableGateway": false, + "gatewayRegionalUrl": "https://apimService1-japaneast-01.regional.azure-api.net", + "gatewayUrl": "https://apimService1.azure-api.net", + "hostnameConfigurations": [ + { + "type": "Proxy", + "certificateSource": "BuiltIn", + "defaultSslBinding": false, + "hostName": "apimService1.azure-api.net", + "negotiateClientCertificate": false + }, + { + "type": "Proxy", + "certificate": { + "expiry": "2022-06-09T23:59:59+00:00", + "subject": "CN=mycustomdomain.int-azure-api.net", + "thumbprint": "2994B5FFB8F76B3C687D324A8DEE0432C1ED18CD" + }, + "certificateSource": "Managed", + "defaultSslBinding": true, + "hostName": "mycustomdomain.int-azure-api.net", + "negotiateClientCertificate": false + } + ], + "managementApiUrl": "https://apimService1.management.azure-api.net", + "notificationSenderEmail": "apimgmt-noreply@mail.windowsazure.com", + "platformVersion": "stv2", + "portalUrl": "https://apimService1.portal.azure-api.net", + "provisioningState": "Succeeded", + "publicIPAddresses": [ + "20.78.248.217" + ], + "publicIpAddressId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/publicIPAddresses/publicip-apim-japan-east", + "publicNetworkAccess": "Enabled", + "publisherEmail": "contoso@microsoft.com", + "publisherName": "apimPublisher", + "scmUrl": "https://apimService1.scm.azure-api.net", + "targetProvisioningState": "", + "virtualNetworkConfiguration": { + "subnetResourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-apim-japaneast/subnets/apim2" + }, + "virtualNetworkType": "Internal" + }, + "sku": { + "name": "Premium", + "capacity": 3 + }, + "systemData": { + "lastModifiedAt": "2022-01-21T20:04:21.6108974Z", + "lastModifiedBy": "contoso@microsoft.com", + "lastModifiedByType": "User" + }, + "zones": [ + "1", + "2", + "3" + ] + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-08-01" + } + } + }, + "operationId": "ApiManagementService_Update", + "title": "ApiManagementUpdateServiceToNewVnetAndAvailabilityZones" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json new file mode 100644 index 0000000000..1bec4433b2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_CreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "operationId": "5600b57e7e8880006a080001", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "5600b57e7e8880006a040001", + "parameters": { + "properties": { + "format": "xml", + "value": " " + } + }, + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy", + "properties": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "201": { + "body": { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b57e7e8880006a040001/operations/5600b57e7e8880006a080001/policies/policy", + "properties": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "operationId": "ApiOperationPolicy_CreateOrUpdate", + "title": "ApiManagementCreateApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json new file mode 100644 index 0000000000..374949375f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "operationId": "testoperation", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "testapi", + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiOperationPolicy_Delete", + "title": "ApiManagementDeleteApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json new file mode 100644 index 0000000000..167d1075af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_Get.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "operationId": "5600b53ac53f5b0062080006", + "api-version": "2021-08-01", + "apiId": "5600b539c53f5b0062040001", + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5600b539c53f5b0062040001/operations/5600b53ac53f5b0062080006/policies/policy", + "properties": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n This is a sample\r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "operationId": "ApiOperationPolicy_Get", + "title": "ApiManagementGetApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json new file mode 100644 index 0000000000..e376a52d6d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_GetEntityTag.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "operationId": "5600b53ac53f5b0062080006", + "api-version": "2021-08-01", + "apiId": "5600b539c53f5b0062040001", + "policyId": "policy", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiOperationPolicy_GetEntityTag", + "title": "ApiManagementHeadApiOperationPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json new file mode 100644 index 0000000000..c383688191 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperationPolicy_ListByOperation.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "operationId": "599e29ab193c3c0bd0b3e2fb", + "api-version": "2021-08-01", + "apiId": "599e2953193c3c0bd0b3e2fa", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "policy", + "type": "Microsoft.ApiManagement/service/apis/operations/policies", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/599e2953193c3c0bd0b3e2fa/operations/599e29ab193c3c0bd0b3e2fb/policies/policy", + "properties": { + "value": "\r\n\r\n \r\n \r\n \r\n \r\n xxx\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + ] + } + } + }, + "operationId": "ApiOperationPolicy_ListByOperation", + "title": "ApiManagementListApiOperationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json new file mode 100644 index 0000000000..c988ac7096 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_CreateOrUpdate.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "operationId": "newoperations", + "api-version": "2021-08-01", + "apiId": "PetStoreTemplate2", + "parameters": { + "properties": { + "method": "POST", + "description": "This can only be done by the logged in user.", + "displayName": "createUser2", + "templateParameters": [], + "urlTemplate": "/user1", + "request": { + "description": "Created user object", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "application/json", + "schemaId": "592f6c1d0af5840ca8897f0c", + "typeName": "User" + } + ] + }, + "responses": [ + { + "description": "successful operation", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 200 + } + ] + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newoperations", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/PetStoreTemplate2/operations/newoperations", + "properties": { + "method": "POST", + "description": "This can only be done by the logged in user.", + "displayName": "createUser2", + "templateParameters": [], + "urlTemplate": "/user1", + "request": { + "description": "Created user object", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "application/json", + "schemaId": "592f6c1d0af5840ca8897f0c", + "typeName": "User" + } + ] + }, + "responses": [ + { + "description": "successful operation", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 200 + } + ] + } + } + }, + "201": { + "body": { + "name": "newoperations", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/PetStoreTemplate2/operations/newoperations", + "properties": { + "method": "POST", + "description": "This can only be done by the logged in user.", + "displayName": "createUser2", + "templateParameters": [], + "urlTemplate": "/user1", + "request": { + "description": "Created user object", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "application/json", + "schemaId": "592f6c1d0af5840ca8897f0c", + "typeName": "User" + } + ] + }, + "responses": [ + { + "description": "successful operation", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 200 + } + ] + } + } + } + }, + "operationId": "ApiOperation_CreateOrUpdate", + "title": "ApiManagementCreateApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json new file mode 100644 index 0000000000..028f08bfb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiOperation_Delete", + "title": "ApiManagementDeleteApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json new file mode 100644 index 0000000000..d2b9165e00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiOperation_GetEntityTag", + "title": "ApiManagementHeadApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json new file mode 100644 index 0000000000..4492d1ff29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperation.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc", + "properties": { + "method": "POST", + "displayName": "CancelOrder", + "templateParameters": [], + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder", + "request": { + "description": "IFazioService_CancelOrder_InputMessage", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrder" + } + ] + }, + "responses": [ + { + "description": "IFazioService_CancelOrder_OutputMessage", + "headers": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrderResponse" + } + ], + "statusCode": 200 + } + ] + } + } + } + }, + "operationId": "ApiOperation_Get", + "title": "ApiManagementGetApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json new file mode 100644 index 0000000000..c388029633 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Get_ApiManagementGetApiOperationPetStore.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "operationId": "loginUser", + "api-version": "2021-08-01", + "apiId": "swagger-petstore", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "loginUser", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/swagger-petstore/operations/loginUser", + "properties": { + "method": "GET", + "description": "", + "displayName": "Logs user into the system", + "templateParameters": [ + { + "name": "username", + "type": "string", + "description": "The user name for login", + "required": true, + "values": [] + }, + { + "name": "password", + "type": "string", + "description": "The password for login in clear text", + "required": true, + "values": [] + } + ], + "urlTemplate": "/user/login?username={username}&password={password}", + "request": { + "headers": [], + "queryParameters": [], + "representations": [] + }, + "responses": [ + { + "description": "successful operation", + "headers": [ + { + "name": "X-Rate-Limit", + "type": "integer", + "description": "calls per hour allowed by the user", + "values": [] + }, + { + "name": "X-Expires-After", + "type": "string", + "description": "date in UTC when token expires", + "values": [] + } + ], + "representations": [ + { + "contentType": "application/xml", + "schemaId": "5ba91a35f373b513a0bf31c6", + "typeName": "UserLoginGet200ApplicationXmlResponse" + }, + { + "contentType": "application/json", + "schemaId": "5ba91a35f373b513a0bf31c6", + "typeName": "UserLoginGet200ApplicationJsonResponse" + } + ], + "statusCode": 200 + }, + { + "description": "Invalid username/password supplied", + "headers": [], + "representations": [ + { + "contentType": "application/xml" + }, + { + "contentType": "application/json" + } + ], + "statusCode": 400 + } + ] + } + } + } + }, + "operationId": "ApiOperation_Get", + "title": "ApiManagementGetApiOperationPetStore" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json new file mode 100644 index 0000000000..e2a89d2e81 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_ListByApi.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0ad01d6cdc", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 5, + "nextLink": "", + "value": [ + { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc", + "properties": { + "method": "POST", + "displayName": "CancelOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cda", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cda", + "properties": { + "method": "POST", + "displayName": "GetMostRecentOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/GetMostRecentOrder" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cd9", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cd9", + "properties": { + "method": "POST", + "displayName": "GetOpenOrders", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/GetOpenOrders" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cdb", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdb", + "properties": { + "method": "POST", + "displayName": "GetOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/GetOrder" + } + }, + { + "name": "57d2ef278aa04f0ad01d6cd8", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cd8", + "properties": { + "method": "POST", + "displayName": "submitOrder", + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/submitOrder" + } + } + ] + } + } + }, + "operationId": "ApiOperation_ListByApi", + "title": "ApiManagementListApiOperations" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json new file mode 100644 index 0000000000..daa971f465 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiOperation_Update.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "operationId": "operationId", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "parameters": { + "properties": { + "method": "GET", + "displayName": "Retrieve resource", + "templateParameters": [], + "urlTemplate": "/resource", + "request": { + "queryParameters": [ + { + "name": "param1", + "type": "string", + "description": "A sample parameter that is required and has a default value of \"sample\".", + "defaultValue": "sample", + "required": true, + "values": [ + "sample" + ] + } + ] + }, + "responses": [ + { + "description": "Returned in all cases.", + "headers": [], + "representations": [], + "statusCode": 200 + }, + { + "description": "Server Error.", + "headers": [], + "representations": [], + "statusCode": 500 + } + ] + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d2ef278aa04f0ad01d6cdc", + "type": "Microsoft.ApiManagement/service/apis/operations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc", + "properties": { + "method": "POST", + "displayName": "CancelOrder", + "templateParameters": [], + "urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder", + "request": { + "description": "IFazioService_CancelOrder_InputMessage", + "headers": [], + "queryParameters": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrder" + } + ] + }, + "responses": [ + { + "description": "IFazioService_CancelOrder_OutputMessage", + "headers": [], + "representations": [ + { + "contentType": "text/xml", + "schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8", + "typeName": "CancelOrderResponse" + } + ], + "statusCode": 200 + } + ] + } + } + } + }, + "operationId": "ApiOperation_Update", + "title": "ApiManagementUpdateApiOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json new file mode 100644 index 0000000000..fb304a3073 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiProduct_ListByApis.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b539c53f5b0062060002", + "type": "Microsoft.ApiManagement/service/apis/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b539c53f5b0062060002", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Unlimited", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + ] + } + } + }, + "operationId": "ApiProduct_ListByApis", + "title": "ApiManagementListApiProducts" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json new file mode 100644 index 0000000000..c5e116d0b8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "parameters": { + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "notes": "yahooagain" + } + }, + "releaseId": "testrev", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testrev", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:52:00.65Z", + "notes": "yahooagain", + "updatedDateTime": "2018-02-08T20:52:00.65Z" + } + } + }, + "201": { + "body": { + "name": "testrev", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:52:00.65Z", + "notes": "yahooagain", + "updatedDateTime": "2018-02-08T20:52:00.65Z" + } + } + } + }, + "operationId": "ApiRelease_CreateOrUpdate", + "title": "ApiManagementCreateApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json new file mode 100644 index 0000000000..8e07af09ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "5a5fcc09124a7fa9b89f2f1d", + "releaseId": "testrev", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiRelease_Delete", + "title": "ApiManagementDeleteApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json new file mode 100644 index 0000000000..9d998d7cfa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "releaseId": "5a7cb545298324c53224a799", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "5a7cb545298324c53224a799", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:38:29.173Z", + "notes": "yahoo", + "updatedDateTime": "2018-02-08T20:38:29.173Z" + } + } + } + }, + "operationId": "ApiRelease_Get", + "title": "ApiManagementGetApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json new file mode 100644 index 0000000000..4189157de2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "releaseId": "5a7cb545298324c53224a799", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiRelease_GetEntityTag", + "title": "ApiManagementHeadApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json new file mode 100644 index 0000000000..3e1767c8bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_ListByService.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5a7cb545298324c53224a799", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/5a7cb545298324c53224a799", + "properties": { + "createdDateTime": "2018-02-08T20:38:29.173Z", + "notes": "yahoo", + "updatedDateTime": "2018-02-08T20:38:29.173Z" + } + } + ] + } + } + }, + "operationId": "ApiRelease_ListByService", + "title": "ApiManagementListApiReleases" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json new file mode 100644 index 0000000000..e8194601ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRelease_Update.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "a1", + "parameters": { + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "notes": "yahooagain" + } + }, + "releaseId": "testrev", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testrev", + "type": "Microsoft.ApiManagement/service/apis/releases", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1/releases/testrev", + "properties": { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "createdDateTime": "2018-02-08T20:38:29.173Z", + "notes": "yahoo", + "updatedDateTime": "2018-02-08T20:38:29.173Z" + } + } + } + }, + "operationId": "ApiRelease_Update", + "title": "ApiManagementUpdateApiRelease" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json new file mode 100644 index 0000000000..870e1aa899 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiRevision_ListByService.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "apiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1;rev=1", + "apiRevision": "1", + "createdDateTime": "2018-02-01T22:21:20.467Z", + "isCurrent": true, + "isOnline": true, + "updatedDateTime": "2018-02-01T22:21:20.467Z" + } + ] + } + } + }, + "operationId": "ApiRevision_ListByService", + "title": "ApiManagementListApiRevisions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json new file mode 100644 index 0000000000..5e4b342cf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_CreateOrUpdate.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "parameters": { + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "resourceGroupName": "rg1", + "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "201": { + "body": { + "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "ApiSchema_CreateOrUpdate", + "title": "ApiManagementCreateApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json new file mode 100644 index 0000000000..df88078b65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "schemaId": "59d5b28e1f7fab116402044e", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiSchema_Delete", + "title": "ApiManagementDeleteApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json new file mode 100644 index 0000000000..e52bcba3d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/schemas/ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "properties": { + "contentType": "application/vnd.ms-azure-apim.xsd+xml", + "document": { + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + } + }, + "operationId": "ApiSchema_Get", + "title": "ApiManagementGetApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json new file mode 100644 index 0000000000..f522a1bb10 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "schemaId": "ec12520d-9d48-4e7b-8f39-698ca2ac63f1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiSchema_GetEntityTag", + "title": "ApiManagementHeadApiSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json new file mode 100644 index 0000000000..446317073d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiSchema_ListByApi.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "59d5b28e1f7fab116402044e", + "type": "Microsoft.ApiManagement/service/apis/schemas", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d5b28d1f7fab116c282650/schemas/59d5b28e1f7fab116402044e", + "properties": { + "contentType": "application/vnd.ms-azure-apim.swagger.definitions+json" + } + } + ] + } + } + }, + "operationId": "ApiSchema_ListByApi", + "title": "ApiManagementListApiSchemas" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json new file mode 100644 index 0000000000..76abda526c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_CreateOrUpdate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "5931a75ae4bbd512a88c680b", + "parameters": { + "properties": { + "description": "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + "externalDocsDescription": "Description of the external docs resource", + "externalDocsUrl": "http://some.url/additionaldoc" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "tagId1" + }, + "responses": { + "200": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b/tagDescriptions/tagId1", + "properties": { + "description": "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1" + } + } + }, + "201": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5931a75ae4bbd512a88c680b/tagDescriptions/tagId1", + "properties": { + "description": "Some description that will be displayed for operation's tag if the tag is assigned to operation of the API", + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1" + } + } + } + }, + "operationId": "ApiTagDescription_CreateOrUpdate", + "title": "ApiManagementCreateApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json new file mode 100644 index 0000000000..81d5069af9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "59d5b28e1f7fab116402044e" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiTagDescription_Delete", + "title": "ApiManagementDeleteApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json new file mode 100644 index 0000000000..97c616554d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "body": { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/apis/tagDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/59d6bb8f1f7fab13dc67ec9b/tagDescriptions/59306a29e4bbd510dc24e5f9", + "properties": { + "description": null, + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9" + } + } + } + }, + "operationId": "ApiTagDescription_Get", + "title": "ApiManagementGetApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json new file mode 100644 index 0000000000..53ddf42710 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagDescriptionId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "headers": { + "Etag": "AAAAAAAACCI=" + } + } + }, + "operationId": "ApiTagDescription_GetEntityTag", + "title": "ApiManagementHeadApiTagDescription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json new file mode 100644 index 0000000000..55ee3965ec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiTagDescription_ListByService.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b539c53f5b0062060002", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tagDescriptions/5600b539c53f5b0062060002", + "properties": { + "displayName": "tag1", + "externalDocsDescription": "some additional info", + "externalDocsUrl": "http://some_url.com", + "tagId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002" + } + } + ] + } + } + }, + "operationId": "ApiTagDescription_ListByService", + "title": "ApiManagementListApiTagDescriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json new file mode 100644 index 0000000000..d44c54f15c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_CreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "api1" + }, + "responses": { + "200": { + "body": { + "name": "api1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/api1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + } + }, + "201": { + "body": { + "name": "api1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/api1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + } + } + }, + "operationId": "ApiVersionSet_CreateOrUpdate", + "title": "ApiManagementCreateApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json new file mode 100644 index 0000000000..69981c6d1e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "a1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ApiVersionSet_Delete", + "title": "ApiManagementDeleteApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json new file mode 100644 index 0000000000..96f2fde256 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Get.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "vs1" + }, + "responses": { + "200": { + "body": { + "name": "vs1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1", + "properties": { + "description": "Version configuration", + "displayName": "Version Set 1", + "versioningScheme": "Segment" + } + } + } + }, + "operationId": "ApiVersionSet_Get", + "title": "ApiManagementGetApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json new file mode 100644 index 0000000000..be04f6b580 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "vs1" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "ApiVersionSet_GetEntityTag", + "title": "ApiManagementHeadApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json new file mode 100644 index 0000000000..f595224c42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_ListByService.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "vs1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + }, + { + "name": "vs2", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs2", + "properties": { + "description": "Version configuration 2", + "displayName": "api set 2", + "versioningScheme": "Query" + } + } + ] + } + } + }, + "operationId": "ApiVersionSet_ListByService", + "title": "ApiManagementListApiVersionSets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json new file mode 100644 index 0000000000..7a04f17fb0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ApiVersionSet_Update.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "versionSetId": "vs1" + }, + "responses": { + "200": { + "body": { + "name": "vs1", + "type": "Microsoft.ApiManagement/service/api-version-sets", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/vs1", + "properties": { + "description": "Version configuration", + "displayName": "api set 1", + "versioningScheme": "Segment" + } + } + } + }, + "operationId": "ApiVersionSet_Update", + "title": "ApiManagementUpdateApiVersionSet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json new file mode 100644 index 0000000000..53f8921386 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApi.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "path": "newapiPath", + "description": "apidescription5200", + "authenticationSettings": { + "oAuth2": { + "authorizationServerId": "authorizationServerId2283", + "scope": "oauth2scope2580" + } + }, + "displayName": "apiname1463", + "protocols": [ + "https", + "http" + ], + "serviceUrl": "http://newechoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "header4520", + "query": "query3037" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": { + "oAuth2": { + "authorizationServerId": "authorizationServerId2283", + "scope": "oauth2scope2580" + } + }, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://newechoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "header4520", + "query": "query3037" + } + } + } + }, + "201": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": { + "oAuth2": { + "authorizationServerId": "authorizationServerId2283", + "scope": "oauth2scope2580" + } + }, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://newechoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "header4520", + "query": "query3037" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json new file mode 100644 index 0000000000..3db3b0b571 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiClone.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api2", + "parameters": { + "properties": { + "path": "echo2", + "description": "Copy of Existing Echo Api including Operations.", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "sourceApiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58a4aeac497000007d040001", + "subscriptionRequired": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echoapi2", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapi2", + "properties": { + "path": "echo2", + "description": "Copy of Existing Echo Api including Operations.", + "apiRevision": "1", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "echoapi2", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapi2", + "properties": { + "path": "echo2", + "description": "Copy of Existing Echo Api including Operations.", + "apiRevision": "1", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiClone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json new file mode 100644 index 0000000000..d7486b6668 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echoapiv3", + "parameters": { + "properties": { + "path": "echo2", + "description": "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + "apiVersion": "v4", + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "sourceApiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoPath", + "subscriptionRequired": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echoapiv3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapiv3", + "properties": { + "path": "echo2", + "description": "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + "apiRevision": "1", + "apiVersion": "v4", + "apiVersionSet": { + "name": "Echo API2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "versioningScheme": "Segment" + }, + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "echoapiv3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echoapiv3", + "properties": { + "path": "echo2", + "description": "Create Echo API into a new Version using Existing Version Set and Copy all Operations.", + "apiRevision": "1", + "apiVersion": "v4", + "apiVersionSet": { + "name": "Echo API2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "versioningScheme": "Segment" + }, + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/aa9c59e6-c0cd-4258-9356-9ca7d2f0b458", + "displayName": "Echo API2", + "isCurrent": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiNewVersionUsingExistingApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json new file mode 100644 index 0000000000..7f71af235d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api;rev=3", + "parameters": { + "properties": { + "path": "echo", + "apiRevisionDescription": "Creating a Revision of an existing API", + "serviceUrl": "http://echoapi.cloudapp.net/apiv3", + "sourceApiId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echo-api;rev=3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3", + "properties": { + "path": "echo", + "apiRevision": "3", + "apiRevisionDescription": "Creating a Revision of an existing API", + "displayName": "Echo API", + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/apiv3", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "echo-api;rev=3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3", + "properties": { + "path": "echo", + "apiRevision": "3", + "apiRevisionDescription": "Creating a Revision of an existing API", + "displayName": "Echo API", + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/apiv3", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + }, + "subscriptionRequired": true + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiRevisionFromExistingApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json new file mode 100644 index 0000000000..cb3779c56f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "apidocs", + "parameters": { + "properties": { + "format": "swagger-link", + "path": "petstoreapi123", + "serviceUrl": "http://petstore.swagger.wordnik.com/api", + "value": "http://apimpimportviaurl.azurewebsites.net/api/apidocs/" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apidocs", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs", + "properties": { + "path": "petstoreapi123", + "description": "This is a sample server Petstore server. You can find out more about Swagger \n at http://swagger.wordnik.com or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters", + "apiRevision": "1", + "displayName": "Swagger Sample App", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.wordnik.com/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "apidocs", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs", + "properties": { + "path": "petstoreapi123", + "description": "This is a sample server Petstore server. You can find out more about Swagger \n at http://swagger.wordnik.com or on irc.freenode.net, #swagger. For this sample,\n you can use the api key \"special-key\" to test the authorization filters", + "apiRevision": "1", + "displayName": "Swagger Sample App", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.wordnik.com/api", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apidocs?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingImportOverrideServiceUrl" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json new file mode 100644 index 0000000000..7d4f61e25a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingOai3Import.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "openapi-link", + "path": "petstore", + "value": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v1", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v1", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingOai3Import" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json new file mode 100644 index 0000000000..29b5591535 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "swagger-link-json", + "path": "petstore", + "value": "http://petstore.swagger.io/v2/swagger.json" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "http" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "petstoreapi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/petstoreapi", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "http" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingSwaggerImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json new file mode 100644 index 0000000000..a02c34684d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiUsingWadlImport.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "petstore", + "parameters": { + "properties": { + "format": "wadl-link-json", + "path": "collector", + "value": "https://developer.cisco.com/media/wae-release-6-2-api-reference/wae-collector-rest-api/application.wadl" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "collectorwadl", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/collectorwadl", + "properties": { + "path": "collector", + "description": "", + "apiRevision": "1", + "displayName": "http://localhost:8080/collector-northbound", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://localhost:8080/collector-northbound", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "collectorwadl", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/collectorwadl", + "properties": { + "path": "collector", + "description": "", + "apiRevision": "1", + "displayName": "http://localhost:8080/collector-northbound", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://localhost:8080/collector-northbound", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiUsingWadlImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json new file mode 100644 index 0000000000..828e24da34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "authenticationSettings": { + "openid": { + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "openidProviderId": "testopenid" + } + }, + "displayName": "Swagger Petstore", + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "58da4c4ccdae970a08121230", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58da4c4ccdae970a08121230", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "authenticationSettings": { + "openid": { + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "openidProviderId": "testopenid" + } + }, + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "58da4c4ccdae970a08121230", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/58da4c4ccdae970a08121230", + "properties": { + "path": "petstore", + "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.", + "apiRevision": "1", + "authenticationSettings": { + "openid": { + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "openidProviderId": "testopenid" + } + }, + "displayName": "Swagger Petstore", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.io/v2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateApiWithOpenIdConnect" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json new file mode 100644 index 0000000000..1472a30e05 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateGraphQlApi.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "type": "graphql", + "path": "graphql-api", + "description": "apidescription5200", + "displayName": "apiname1463", + "protocols": [ + "http", + "https" + ], + "serviceUrl": "https://api.spacex.land/graphql" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "graphql", + "path": "graphql-api", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "http", + "https" + ], + "serviceUrl": "https://api.spacex.land/graphql", + "subscriptionKeyParameterNames": null + } + } + }, + "201": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "graphql", + "path": "graphql-api", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "https", + "https" + ], + "serviceUrl": "https://api.spacex.land/graphql", + "subscriptionKeyParameterNames": null + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateGraphQLApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json new file mode 100644 index 0000000000..91c36b9295 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "soapApi", + "parameters": { + "properties": { + "format": "wsdl-link", + "path": "currency", + "apiType": "soap", + "value": "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + "wsdlSelector": { + "wsdlEndpointName": "CurrencyConvertorSoap", + "wsdlServiceName": "CurrencyConvertor" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "type": "soap", + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "type": "soap", + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateSoapPassThroughApiUsingWsdlImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json new file mode 100644 index 0000000000..baa2d205e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "soapApi", + "parameters": { + "properties": { + "format": "wsdl-link", + "path": "currency", + "value": "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL", + "wsdlSelector": { + "wsdlEndpointName": "CurrencyConvertorSoap", + "wsdlServiceName": "CurrencyConvertor" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "201": { + "body": { + "name": "soapApi", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/soapApi", + "properties": { + "path": "currency", + "apiRevision": "1", + "displayName": "CurrencyConvertor", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://www.webservicex.net", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateSoapToRestApiUsingWsdlImport" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json new file mode 100644 index 0000000000..f7c5532be1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_CreateOrUpdate_ApiManagementCreateWebSocketApi.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "tempgroup", + "parameters": { + "properties": { + "type": "websocket", + "path": "newapiPath", + "description": "apidescription5200", + "displayName": "apiname1463", + "protocols": [ + "wss", + "ws" + ], + "serviceUrl": "wss://echo.websocket.org" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "websocket", + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "ws", + "wss" + ], + "serviceUrl": "wss://echo.websocket.org", + "subscriptionKeyParameterNames": null + } + } + }, + "201": { + "body": { + "name": "apiid9419", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419", + "properties": { + "type": "websocket", + "path": "newapiPath", + "description": "apidescription5200", + "apiRevision": "1", + "authenticationSettings": null, + "displayName": "apiname1463", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "ws", + "wss" + ], + "serviceUrl": "wss://echo.websocket.org", + "subscriptionKeyParameterNames": null + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "Api_CreateOrUpdate", + "title": "ApiManagementCreateWebSocketApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json new file mode 100644 index 0000000000..1159431b36 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Api_Delete", + "title": "ApiManagementDeleteApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json new file mode 100644 index 0000000000..4ffc87136f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Api_GetEntityTag", + "title": "ApiManagementHeadApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json new file mode 100644 index 0000000000..a496cca55a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiContract.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "57d1f7558aa04f15146d9d8a", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "57d1f7558aa04f15146d9d8a", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a", + "properties": { + "type": "soap", + "path": "schulte", + "apiRevision": "1", + "displayName": "Service", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "https" + ], + "serviceUrl": "https://api.plexonline.com/DataSource/Service.asmx", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + } + }, + "operationId": "Api_Get", + "title": "ApiManagementGetApiContract" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json new file mode 100644 index 0000000000..649ffd54f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Get_ApiManagementGetApiRevisionContract.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "echo-api;rev=3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echo-api;rev=3", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api;rev=3", + "properties": { + "path": "schulte", + "apiRevision": "3", + "apiRevisionDescription": "fixed bug in contract", + "displayName": "Service", + "protocols": [ + "https" + ], + "serviceUrl": "https://api.plexonline.com/DataSource/Service.asmx", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + } + }, + "operationId": "Api_Get", + "title": "ApiManagementGetApiRevisionContract" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json new file mode 100644 index 0000000000..6a8836ab18 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByService.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 4, + "nextLink": "", + "value": [ + { + "name": "a1", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/a1", + "properties": { + "path": "api1", + "apiRevision": "1", + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4", + "displayName": "api1", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api" + } + }, + { + "name": "5a73933b8f27f7cc82a2d533", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a73933b8f27f7cc82a2d533", + "properties": { + "path": "api1", + "apiRevision": "1", + "apiVersion": "v1", + "apiVersionSetId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apiVersionSets/c48f96c9-1385-4e2d-b410-5ab591ce0fc4", + "displayName": "api1", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api" + } + }, + { + "name": "echo-api", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + "properties": { + "path": "echo", + "apiRevision": "1", + "displayName": "Echo API", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api" + } + }, + { + "name": "5a7390baa5816a110435aee0", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/5a7390baa5816a110435aee0", + "properties": { + "path": "vvv", + "description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification", + "apiRevision": "1", + "displayName": "Swagger Petstore Extensive", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://petstore.swagger.wordnik.com/api" + } + } + ] + } + } + }, + "operationId": "Api_ListByService", + "title": "ApiManagementListApis" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json new file mode 100644 index 0000000000..7cadce246d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_ListByTags.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "api": { + "name": "Echo API", + "path": "echo", + "apiRevision": "1", + "id": "/apis/echo-api", + "isCurrent": true, + "serviceUrl": "http://echoapi.cloudapp.net/api" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "Api_ListByTags", + "title": "ApiManagementListApisByTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json new file mode 100644 index 0000000000..b4283efb1d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Api_Update.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "echo-api", + "parameters": { + "properties": { + "path": "newecho", + "displayName": "Echo API New", + "serviceUrl": "http://echoapi.cloudapp.net/api2" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "echo-api", + "type": "Microsoft.ApiManagement/service/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api", + "properties": { + "path": "newecho", + "apiRevision": "1", + "displayName": "Echo API New", + "isCurrent": true, + "isOnline": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://echoapi.cloudapp.net/api2", + "subscriptionKeyParameterNames": { + "header": "Ocp-Apim-Subscription-Key", + "query": "subscription-key" + } + } + } + } + }, + "operationId": "Api_Update", + "title": "ApiManagementUpdateApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json new file mode 100644 index 0000000000..924da99ae5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_CreateOrUpdate.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer", + "parameters": { + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "clientSecret": "2", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + }, + "201": { + "body": { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + } + }, + "operationId": "AuthorizationServer_CreateOrUpdate", + "title": "ApiManagementCreateAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json new file mode 100644 index 0000000000..b680c8d7e8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AuthorizationServer_Delete", + "title": "ApiManagementDeleteAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json new file mode 100644 index 0000000000..e81cc6f914 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Get.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newauthServer2", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientAuthenticationMethod": [ + "Basic" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test3", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + } + }, + "operationId": "AuthorizationServer_Get", + "title": "ApiManagementGetAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json new file mode 100644 index 0000000000..c7fb9600d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "AuthorizationServer_GetEntityTag", + "title": "ApiManagementHeadAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json new file mode 100644 index 0000000000..2d7e4ac519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListByService.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test2", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + }, + { + "name": "newauthServer2", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer2", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientAuthenticationMethod": [ + "Basic" + ], + "clientId": "1", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test3", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + ] + } + } + }, + "operationId": "AuthorizationServer_ListByService", + "title": "ApiManagementListAuthorizationServers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json new file mode 100644 index 0000000000..283efaaeed --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_ListSecrets.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "authsid": "newauthServer2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "clientSecret": "2", + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un" + } + } + }, + "operationId": "AuthorizationServer_ListSecrets", + "title": "ApiManagementAuthorizationServerListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json new file mode 100644 index 0000000000..5b36dee942 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/AuthorizationServer_Update.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "authsid": "newauthServer", + "parameters": { + "properties": { + "clientId": "update", + "clientSecret": "updated" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "newauthServer", + "type": "Microsoft.ApiManagement/service/authorizationServers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationServers/newauthServer", + "properties": { + "description": "test server", + "authorizationEndpoint": "https://www.contoso.com/oauth2/auth", + "authorizationMethods": [ + "GET" + ], + "bearerTokenSendingMethods": [ + "authorizationHeader" + ], + "clientAuthenticationMethod": [ + "Basic" + ], + "clientId": "updated", + "clientRegistrationEndpoint": "https://www.contoso.com/apps", + "defaultScope": "read write", + "displayName": "test3", + "grantTypes": [ + "authorizationCode", + "implicit" + ], + "resourceOwnerPassword": "pwd", + "resourceOwnerUsername": "un", + "supportState": true, + "tokenEndpoint": "https://www.contoso.com/oauth2/token" + } + } + } + }, + "operationId": "AuthorizationServer_Update", + "title": "ApiManagementUpdateAuthorizationServer" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json new file mode 100644 index 0000000000..b47479351b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendProxyBackend.json @@ -0,0 +1,128 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "proxybackend", + "parameters": { + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": true, + "validateCertificateName": true + }, + "url": "https://backendname2644/", + "protocol": "http" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": false + }, + "url": "https://backendname2644/", + "protocol": "http" + } + } + }, + "201": { + "body": { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": false + }, + "url": "https://backendname2644/", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_CreateOrUpdate", + "title": "ApiManagementCreateBackendProxyBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json new file mode 100644 index 0000000000..6809154344 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_CreateOrUpdate_ApiManagementCreateBackendServiceFabric.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "sfbackend", + "parameters": { + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + }, + "201": { + "body": { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_CreateOrUpdate", + "title": "ApiManagementCreateBackendServiceFabric" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json new file mode 100644 index 0000000000..69040586c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "backendId": "sfbackend", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Backend_Delete", + "title": "ApiManagementDeleteBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json new file mode 100644 index 0000000000..17727e92d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "sfbackend", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_Get", + "title": "ApiManagementGetBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json new file mode 100644 index 0000000000..abc3ed2607 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "sfbackend", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Backend_GetEntityTag", + "title": "ApiManagementHeadBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json new file mode 100644 index 0000000000..782192e026 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_ListByService.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": false + }, + "url": "https://backendname2644/", + "protocol": "http" + } + }, + { + "name": "sfbackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/sfbackend", + "properties": { + "description": "Service Fabric Test App 1", + "properties": { + "serviceFabricCluster": { + "clientCertificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "managementEndpoints": [ + "https://somecluster.com" + ], + "maxPartitionResolutionRetries": 5, + "serverX509Names": [ + { + "name": "ServerCommonName1", + "issuerCertificateThumbprint": "IssuerCertificateThumbprint1" + } + ] + } + }, + "url": "fabric:/mytestapp/mytestservice", + "protocol": "http" + } + } + ] + } + } + }, + "operationId": "Backend_ListByService", + "title": "ApiManagementListBackends" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json new file mode 100644 index 0000000000..1e1c1c06a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Reconnect.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "backendId": "proxybackend", + "parameters": { + "properties": { + "after": "PT3S" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "202": {} + }, + "operationId": "Backend_Reconnect", + "title": "ApiManagementBackendReconnect" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json new file mode 100644 index 0000000000..bd0c08b5eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Backend_Update.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "backendId": "proxybackend", + "parameters": { + "properties": { + "description": "description5308", + "tls": { + "validateCertificateChain": false, + "validateCertificateName": true + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "proxybackend", + "type": "Microsoft.ApiManagement/service/backends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/backends/proxybackend", + "properties": { + "description": "description5308", + "credentials": { + "authorization": { + "parameter": "opensesma", + "scheme": "Basic" + }, + "header": { + "x-my-1": [ + "val1", + "val2" + ] + }, + "query": { + "sv": [ + "xx", + "bb", + "cc" + ] + } + }, + "proxy": { + "password": "", + "url": "http://192.168.1.1:8080", + "username": "Contoso\\admin" + }, + "tls": { + "validateCertificateChain": false, + "validateCertificateName": true + }, + "url": "https://backendname2644/", + "protocol": "http" + } + } + } + }, + "operationId": "Backend_Update", + "title": "ApiManagementUpdateBackend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json new file mode 100644 index 0000000000..6af2396c08 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "cacheId": "c1", + "parameters": { + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "apim.redis.cache.windows.net:6380,password=xc,ssl=True,abortConnect=False", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + }, + "201": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + } + }, + "operationId": "Cache_CreateOrUpdate", + "title": "ApiManagementCreateCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json new file mode 100644 index 0000000000..f49e64853b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "cacheId": "southindia", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Cache_Delete", + "title": "ApiManagementDeleteCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json new file mode 100644 index 0000000000..826d674118 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "cacheId": "c1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + } + }, + "operationId": "Cache_Get", + "title": "ApiManagementGetCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json new file mode 100644 index 0000000000..2278e9d504 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "cacheId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Cache_GetEntityTag", + "title": "ApiManagementHeadCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json new file mode 100644 index 0000000000..59221c21f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_ListByService.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "default" + } + } + ] + } + } + }, + "operationId": "Cache_ListByService", + "title": "ApiManagementListCaches" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json new file mode 100644 index 0000000000..3bff9f587f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Cache_Update.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "cacheId": "c1", + "parameters": { + "properties": { + "useFromLocation": "westindia" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "c1", + "type": "Microsoft.ApiManagement/service/caches", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/caches/c1", + "properties": { + "description": "Redis cache instances in West India", + "connectionString": "{{5f7fbca77a891a2200f3db38}}", + "resourceId": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/apimservice1", + "useFromLocation": "westindia" + } + } + } + }, + "operationId": "Cache_Update", + "title": "ApiManagementUpdateCache" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json new file mode 100644 index 0000000000..2f084a4650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificate.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "tempcert", + "parameters": { + "properties": { + "data": "****************Base 64 Encoded Certificate *******************************", + "password": "****Certificate Password******" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "tempcert", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert", + "properties": { + "expirationDate": "2018-03-17T21:55:07+00:00", + "subject": "CN=contoso.com", + "thumbprint": "*******************3" + } + } + }, + "201": { + "body": { + "name": "tempcert", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/tempcert", + "properties": { + "expirationDate": "2018-03-17T21:55:07+00:00", + "subject": "CN=contoso.com", + "thumbprint": "*******************3" + } + } + } + }, + "operationId": "Certificate_CreateOrUpdate", + "title": "ApiManagementCreateCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json new file mode 100644 index 0000000000..b970ff09a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCertkv", + "parameters": { + "properties": { + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + }, + "201": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + } + }, + "operationId": "Certificate_CreateOrUpdate", + "title": "ApiManagementCreateCertificateWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json new file mode 100644 index 0000000000..81339708c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "certificateId": "tempcert", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Certificate_Delete", + "title": "ApiManagementDeleteCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json new file mode 100644 index 0000000000..efa4936f21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCert1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Certificate_GetEntityTag", + "title": "ApiManagementHeadCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json new file mode 100644 index 0000000000..1c60974103 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificate.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCert1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCert1", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCert1", + "properties": { + "expirationDate": "2017-04-23T17:03:41Z", + "subject": "CN=mutual-authcert", + "thumbprint": "EBA**********************8594A6" + } + } + } + }, + "operationId": "Certificate_Get", + "title": "ApiManagementGetCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json new file mode 100644 index 0000000000..e4aca0b6bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_Get_ApiManagementGetCertificateWithKeyVault.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCertkv", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + } + }, + "operationId": "Certificate_Get", + "title": "ApiManagementGetCertificateWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json new file mode 100644 index 0000000000..bf0e1cc9be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_ListByService.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "templateCert1", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/kjoshiarmtemplateCert1", + "properties": { + "expirationDate": "2017-04-23T17:03:41Z", + "subject": "CN=mutual-authcert", + "thumbprint": "EBA************************48594A6" + } + }, + { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + ] + } + } + }, + "operationId": "Certificate_ListByService", + "title": "ApiManagementListCertificates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json new file mode 100644 index 0000000000..b4a0d735f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Certificate_RefreshSecret.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "templateCertkv", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateCertkv", + "type": "Microsoft.ApiManagement/service/certificates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/templateCertkv", + "properties": { + "expirationDate": "2037-01-01T07:00:00Z", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-22T00:24:53.3191468Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "subject": "CN=*.msitesting.net", + "thumbprint": "EA**********************9AD690" + } + } + } + }, + "operationId": "Certificate_RefreshSecret", + "title": "ApiManagementRefreshCertificate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json new file mode 100644 index 0000000000..2c666ae432 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "contentItemId": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "contentTypeId": "page", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "type": "Microsoft.ApiManagement/service/contentTypes/contentItems", + "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "properties": { + "en_us": { + "description": "Short story about the company.", + "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "keywords": "company, about", + "permalink": "/about", + "title": "About" + } + } + } + } + }, + "operationId": "ContentItem_Get", + "title": "ApiManagementGetContentTypeContentItem" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json new file mode 100644 index 0000000000..f5b72e5ebb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentItem_ListByService.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "contentTypeId": "page", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "type": "Microsoft.ApiManagement/service/contentTypes/contentItems", + "id": "/contentTypes/page/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "properties": { + "en_us": { + "description": "Short story about the company.", + "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8", + "keywords": "company, about", + "permalink": "/about", + "title": "About" + } + } + } + ] + } + } + }, + "operationId": "ContentItem_ListByService", + "title": "ApiManagementListContentTypeContentItems" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json new file mode 100644 index 0000000000..0e2132edc8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_Get.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "contentTypeId": "page", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "page", + "type": "Microsoft.ApiManagement/service/contentTypes", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/contentTypes/page", + "properties": { + "name": "Page", + "schema": { + "additionalProperties": false, + "properties": { + "en_us": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "Page description. This property gets included in SEO attributes.", + "indexed": true, + "title": "Description" + }, + "documentId": { + "type": "string", + "description": "Reference to page content document.", + "title": "Document ID" + }, + "keywords": { + "type": "string", + "description": "Page keywords. This property gets included in SEO attributes.", + "indexed": true, + "title": "Keywords" + }, + "permalink": { + "type": "string", + "description": "Page permalink, e.g. '/about'.", + "indexed": true, + "title": "Permalink" + }, + "title": { + "type": "string", + "description": "Page title. This property gets included in SEO attributes.", + "indexed": true, + "title": "Title" + } + }, + "required": [ + "title", + "permalink", + "documentId" + ] + } + } + }, + "description": "A regular page", + "version": "1.0.0" + } + } + } + }, + "operationId": "ContentType_Get", + "title": "ApiManagementGetContentType" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json new file mode 100644 index 0000000000..aefb7ecf0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ContentType_ListByService.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "page", + "type": "Microsoft.ApiManagement/service/contentTypes", + "id": "/contentTypes/page", + "properties": { + "name": "Page", + "schema": { + "additionalProperties": false, + "properties": { + "en_us": { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "Page description. This property gets included in SEO attributes.", + "indexed": true, + "title": "Description" + }, + "documentId": { + "type": "string", + "description": "Reference to page content document.", + "title": "Document ID" + }, + "keywords": { + "type": "string", + "description": "Page keywords. This property gets included in SEO attributes.", + "indexed": true, + "title": "Keywords" + }, + "permalink": { + "type": "string", + "description": "Page permalink, e.g. '/about'.", + "indexed": true, + "title": "Permalink" + }, + "title": { + "type": "string", + "description": "Page title. This property gets included in SEO attributes.", + "indexed": true, + "title": "Title" + } + }, + "required": [ + "title", + "permalink", + "documentId" + ] + } + } + }, + "description": "A regular page", + "version": "1.0.0" + } + } + ] + } + } + }, + "operationId": "ContentType_ListByService", + "title": "ApiManagementListContentTypes" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json new file mode 100644 index 0000000000..2c93162273 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_CreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + }, + "validationKey": "" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "delegation", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation", + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + } + } + } + } + }, + "operationId": "DelegationSettings_CreateOrUpdate", + "title": "ApiManagementPortalSettingsUpdateDelegation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json new file mode 100644 index 0000000000..1f6775a0f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "delegation", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation", + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + } + } + } + } + }, + "operationId": "DelegationSettings_Get", + "title": "ApiManagementPortalSettingsGetDelegation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json new file mode 100644 index 0000000000..d1e5e6e318 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_GetEntityTag.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "DelegationSettings_GetEntityTag", + "title": "ApiManagementHeadDelegationSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json new file mode 100644 index 0000000000..38e2f7d045 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_ListSecrets.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "validationKey": "" + } + } + }, + "operationId": "DelegationSettings_ListSecrets", + "title": "ApiManagementListSecretsPortalSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json new file mode 100644 index 0000000000..d455e85940 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DelegationSettings_Update.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "subscriptions": { + "enabled": true + }, + "url": "http://contoso.com/delegation", + "userRegistration": { + "enabled": true + }, + "validationKey": "" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "204": {} + }, + "operationId": "DelegationSettings_Update", + "title": "ApiManagementPortalSettingsUpdateDelegation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json new file mode 100644 index 0000000000..838df2d252 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_GetByName.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "location": "westus", + "serviceName": "apimService3", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "apimService3", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", + "location": "West US", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3" + } + } + } + }, + "operationId": "DeletedServices_GetByName", + "title": "ApiManagementGetDeletedServiceByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json new file mode 100644 index 0000000000..a1488768af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_ListBySubscription.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "apimService3", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", + "location": "West US", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3" + } + }, + { + "name": "apimService", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus2/deletedservices/apimService", + "location": "West US 2", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService" + } + } + ] + } + } + }, + "operationId": "DeletedServices_ListBySubscription", + "title": "ApiManagementDeletedServicesListBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json new file mode 100644 index 0000000000..e07eace046 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/DeletedServices_Purge.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "location": "westus", + "serviceName": "apimService3", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "body": { + "name": "apimService3", + "type": "Microsoft.ApiManagement/deletedservices", + "id": "/subscriptions/subid/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3", + "location": "West US", + "properties": { + "deletionDate": "2017-05-27T15:33:55.5426123Z", + "scheduledPurgeDate": "2017-05-27T15:33:55.5426123Z", + "serviceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService3" + } + }, + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/locations/westus/deletedservices/apimService3/operationresults/TGV2eTExMDZtMDJfVGVybV9jMmZlY2QwMA==?api-version=2021-08-01" + } + }, + "204": {} + }, + "operationId": "DeletedServices_Purge", + "title": "ApiManagementDeletedServicesPurge" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json new file mode 100644 index 0000000000..1539720777 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_CreateOrUpdate.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "subject": "Your request for $IssueName was successfully received." + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

Thank you for contacting us. Our API team will review your issue and get back to you soon.

\r\n

\r\n Click this link to view or edit your request.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n", + "isDefault": false, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request for $IssueName was successfully received.", + "title": "New issue received" + } + } + }, + "201": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

Thank you for contacting us. Our API team will review your issue and get back to you soon.

\r\n

\r\n Click this link to view or edit your request.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n", + "isDefault": false, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request for $IssueName was successfully received.", + "title": "New issue received" + } + } + } + }, + "operationId": "EmailTemplate_CreateOrUpdate", + "title": "ApiManagementCreateTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json new file mode 100644 index 0000000000..39056e12a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "EmailTemplate_Delete", + "title": "ApiManagementDeleteTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json new file mode 100644 index 0000000000..7c370daead --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Get.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

Thank you for contacting us. Our API team will review your issue and get back to you soon.

\r\n

\r\n Click this link to view or edit your request.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n", + "isDefault": true, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request $IssueName was received", + "title": "New issue received" + } + } + } + }, + "operationId": "EmailTemplate_Get", + "title": "ApiManagementGetTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json new file mode 100644 index 0000000000..d50ed0361d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "EmailTemplate_GetEntityTag", + "title": "ApiManagementHeadEmailTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json new file mode 100644 index 0000000000..7a738451ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_ListByService.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "ApplicationApprovedNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/ApplicationApprovedNotificationMessage", + "properties": { + "description": "Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.", + "body": "\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n", + "isDefault": true, + "parameters": [ + { + "name": "AppId", + "title": "Application id" + }, + { + "name": "AppName", + "title": "Application name" + }, + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your application $AppName is published in the application gallery", + "title": "Application gallery submission approved" + } + } + ] + } + } + }, + "operationId": "EmailTemplate_ListByService", + "title": "ApiManagementListTemplates" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json new file mode 100644 index 0000000000..6a1556d134 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/EmailTemplate_Update.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "body": "\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

\r\n We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed here.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n", + "subject": "Your request $IssueName was received" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "templateName": "newIssueNotificationMessage" + }, + "responses": { + "200": { + "body": { + "name": "NewIssueNotificationMessage", + "type": "Microsoft.ApiManagement/service/templates", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage", + "properties": { + "description": "This email is sent to developers after they create a new topic on the Issues page of the developer portal.", + "body": "\r\n\r\n \r\n \r\n

Dear $DevFirstName $DevLastName,

\r\n

Thank you for contacting us. Our API team will review your issue and get back to you soon.

\r\n

\r\n Click this link to view or edit your request.\r\n

\r\n

Best,

\r\n

The $OrganizationName API Team

\r\n \r\n", + "isDefault": true, + "parameters": [ + { + "name": "DevFirstName", + "title": "Developer first name" + }, + { + "name": "DevLastName", + "title": "Developer last name" + }, + { + "name": "IssueId", + "title": "Issue id" + }, + { + "name": "IssueName", + "title": "Issue name" + }, + { + "name": "OrganizationName", + "title": "Organization name" + }, + { + "name": "DevPortalUrl", + "title": "Developer portal URL" + } + ], + "subject": "Your request $IssueName was received", + "title": "New issue received" + } + } + } + }, + "operationId": "EmailTemplate_Update", + "title": "ApiManagementUpdateTemplate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json new file mode 100644 index 0000000000..6512854e44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayApi_ListByService.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57681820a40f7eb6c49f6aca", + "type": "Microsoft.ApiManagement/service/gateways/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/apis/57681820a40f7eb6c49f6aca", + "properties": { + "path": "suffix_57681820a40f7eb6c49f6ace", + "description": "description_57681820a40f7eb6c49f6acc", + "apiRevision": "1", + "displayName": "api_57681820a40f7eb6c49f6acb", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://contoso/57681820a40f7eb6c49f6acd" + } + } + ] + } + } + }, + "operationId": "GatewayApi_ListByService", + "title": "ApiManagementListGatewayApis" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json new file mode 100644 index 0000000000..13b452069c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_CreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "cert1", + "gatewayId": "gw1", + "parameters": { + "properties": { + "isTrusted": false + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": false + } + } + }, + "201": { + "body": { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": false + } + } + } + }, + "operationId": "GatewayCertificateAuthority_CreateOrUpdate", + "title": "ApiManagementCreateGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json new file mode 100644 index 0000000000..27723bbcc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "certificateId": "default", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "GatewayCertificateAuthority_Delete", + "title": "ApiManagementDeleteGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json new file mode 100644 index 0000000000..05d00e5c68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "cert1", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": true + } + } + } + }, + "operationId": "GatewayCertificateAuthority_Get", + "title": "ApiManagementGetGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json new file mode 100644 index 0000000000..6d1f1a177b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "certificateId": "cert1", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "GatewayCertificateAuthority_GetEntityTag", + "title": "ApiManagementHeadGatewayCertificateAuthority" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json new file mode 100644 index 0000000000..008db557a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayCertificateAuthority_ListByService.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "cert1", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert1", + "properties": { + "isTrusted": false + } + }, + { + "name": "cert2", + "type": "Microsoft.ApiManagement/service/gateways/certificateAuthorities", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/certificateAuthorities/cert2", + "properties": { + "isTrusted": true + } + } + ] + } + } + }, + "operationId": "GatewayCertificateAuthority_ListByService", + "title": "ApiManagementListGatewaycertificateAuthorities" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json new file mode 100644 index 0000000000..e63d69b02f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_CreateOrUpdate.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "parameters": { + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "http2Enabled": true, + "negotiateClientCertificate": false, + "tls10Enabled": false, + "tls11Enabled": false + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "http2Enabled": true, + "negotiateClientCertificate": false, + "tls10Enabled": false, + "tls11Enabled": false + } + } + }, + "201": { + "body": { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "http2Enabled": true, + "negotiateClientCertificate": false, + "tls10Enabled": false, + "tls11Enabled": false + } + } + } + }, + "operationId": "GatewayHostnameConfiguration_CreateOrUpdate", + "title": "ApiManagementCreateGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json new file mode 100644 index 0000000000..13321efd24 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "GatewayHostnameConfiguration_Delete", + "title": "ApiManagementDeleteGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json new file mode 100644 index 0000000000..2d845416a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "negotiateClientCertificate": false + } + } + } + }, + "operationId": "GatewayHostnameConfiguration_Get", + "title": "ApiManagementGetGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json new file mode 100644 index 0000000000..db1863b803 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_GetEntityTag.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "hcId": "default", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "GatewayHostnameConfiguration_GetEntityTag", + "title": "ApiManagementHeadGatewayHostnameConfiguration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json new file mode 100644 index 0000000000..458fc53ed0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GatewayHostnameConfiguration_ListByService.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/default", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert1", + "hostname": "*", + "negotiateClientCertificate": false + } + }, + { + "name": "default", + "type": "Microsoft.ApiManagement/service/gateways/hostnameConfigurations", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1/hostnameConfigurations/hostname1", + "properties": { + "certificateId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/certificates/cert2", + "hostname": "foo.bar.com", + "negotiateClientCertificate": true + } + } + ] + } + } + }, + "operationId": "GatewayHostnameConfiguration_ListByService", + "title": "ApiManagementListGatewayHostnameConfigurations" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json new file mode 100644 index 0000000000..a31089003a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "parameters": { + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + }, + "201": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + } + }, + "operationId": "Gateway_CreateOrUpdate", + "title": "ApiManagementCreateGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json new file mode 100644 index 0000000000..92e7521761 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Gateway_Delete", + "title": "ApiManagementDeleteGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json new file mode 100644 index 0000000000..b2ef83c6be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GenerateToken.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "parameters": { + "expiry": "2020-04-21T00:44:24.2845269Z", + "keyType": "primary" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": "gw1&201904210044&9A1GR1f5WIhFvFmzQG+xxxxxxxxxxx/kBeu87DWad3tkasUXuvPL+MgzlwUHyg==" + } + } + }, + "operationId": "Gateway_GenerateToken", + "title": "ApiManagementGatewayGenerateToken" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json new file mode 100644 index 0000000000..0a816141e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + } + }, + "operationId": "Gateway_Get", + "title": "ApiManagementGetGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json new file mode 100644 index 0000000000..b557fffaaa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "mygateway", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Gateway_GetEntityTag", + "title": "ApiManagementHeadGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json new file mode 100644 index 0000000000..660515ea99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListByService.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location 1" + } + } + }, + { + "name": "5a73933b8f27f7cc82a2d533", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw2", + "properties": { + "description": "my gateway 2", + "locationData": { + "name": "my location 2" + } + } + } + ] + } + } + }, + "operationId": "Gateway_ListByService", + "title": "ApiManagementListGateways" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json new file mode 100644 index 0000000000..0c37f4abe2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_ListKeys.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gw1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "primary": "primary_key_value", + "secondary": "secondary_key_value" + } + } + }, + "operationId": "Gateway_ListKeys", + "title": "ApiManagementGatewayListKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json new file mode 100644 index 0000000000..5883e40ab4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_RegenerateKey.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "gatewayId": "gwId", + "parameters": { + "keyType": "primary" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "Gateway_RegenerateKey", + "title": "ApiManagementGatewayRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json new file mode 100644 index 0000000000..8e1cc6a0e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Gateway_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "gatewayId": "gw1", + "parameters": { + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "a1", + "type": "Microsoft.ApiManagement/service/gateways", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/gateways/gw1", + "properties": { + "description": "my gateway 1", + "locationData": { + "name": "my location" + } + } + } + } + }, + "operationId": "Gateway_Update", + "title": "ApiManagementUpdateGateway" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json new file mode 100644 index 0000000000..68b824520b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema1.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + }, + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "201": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "GlobalSchema_CreateOrUpdate", + "title": "ApiManagementCreateSchema1" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json new file mode 100644 index 0000000000..c9091dac3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_CreateOrUpdate_ApiManagementCreateSchema2.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + }, + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + }, + "201": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "GlobalSchema_CreateOrUpdate", + "title": "ApiManagementCreateSchema2" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json new file mode 100644 index 0000000000..70af7a3d65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "GlobalSchema_Delete", + "title": "ApiManagementDeleteSchema" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json new file mode 100644 index 0000000000..f6d335915e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "myschema", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "GlobalSchema_GetEntityTag", + "title": "ApiManagementHeadApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json new file mode 100644 index 0000000000..0a38bb3164 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema1.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "schema1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + } + } + }, + "operationId": "GlobalSchema_Get", + "title": "ApiManagementGetSchema1" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json new file mode 100644 index 0000000000..b21f3a1d3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_Get_ApiManagementGetSchema2.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "schemaId": "schema2", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "schema2", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + } + }, + "operationId": "GlobalSchema_Get", + "title": "ApiManagementGetSchema2" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json new file mode 100644 index 0000000000..03224a01b6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GlobalSchema_ListByService.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "schema1", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema1", + "properties": { + "description": "sample schema description", + "schemaType": "xml", + "value": "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + } + }, + { + "name": "schema2", + "type": "Microsoft.ApiManagement/service/schemas", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/schemas/schema2", + "properties": { + "description": "sample schema description", + "document": { + "type": "object", + "$id": "https://example.com/person.schema.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "properties": { + "age": { + "type": "integer", + "description": "Age in years which must be equal to or greater than zero.", + "minimum": 0 + }, + "firstName": { + "type": "string", + "description": "The person's first name." + }, + "lastName": { + "type": "string", + "description": "The person's last name." + } + }, + "title": "Person" + }, + "schemaType": "json" + } + } + ] + } + } + }, + "operationId": "GlobalSchema_ListByService", + "title": "ApiManagementListSchemas" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json new file mode 100644 index 0000000000..a141230205 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/GroupUser_List.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "armTemplateUser1", + "type": "Microsoft.ApiManagement/service/groups/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/kjoshiarmTemplateUser1", + "properties": { + "email": "user1@live.com", + "firstName": "user1", + "identities": [ + { + "id": "user1@live.com", + "provider": "Basic" + } + ], + "lastName": "lastname1", + "note": "note for user 1", + "registrationDate": "2017-05-31T18:54:41.447Z", + "state": "active" + } + } + ] + } + } + }, + "operationId": "GroupUser_List", + "title": "ApiManagementListGroupUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json new file mode 100644 index 0000000000..f16593c4dd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroup.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "tempgroup", + "parameters": { + "properties": { + "displayName": "temp group" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "tempgroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup", + "properties": { + "type": "custom", + "displayName": "temp group" + } + } + }, + "201": { + "body": { + "name": "tempgroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup", + "properties": { + "type": "custom", + "displayName": "temp group" + } + } + } + }, + "operationId": "Group_CreateOrUpdate", + "title": "ApiManagementCreateGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json new file mode 100644 index 0000000000..26433daf0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_CreateOrUpdate_ApiManagementCreateGroupExternal.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "aadGroup", + "parameters": { + "properties": { + "type": "external", + "description": "new group to test", + "displayName": "NewGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "aadGroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup", + "properties": { + "type": "external", + "description": "new group to test", + "displayName": "NewGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + } + } + }, + "201": { + "body": { + "name": "aadGroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/aadGroup", + "properties": { + "type": "external", + "description": "new group to test", + "displayName": "NewGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/83cf2753-5831-4675-bc0e-2f8dc067c58d" + } + } + } + }, + "operationId": "Group_CreateOrUpdate", + "title": "ApiManagementCreateGroupExternal" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json new file mode 100644 index 0000000000..66d5d78217 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "groupId": "aadGroup", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Group_Delete", + "title": "ApiManagementDeleteGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json new file mode 100644 index 0000000000..f165b46a04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "59306a29e4bbd510dc24e5f9", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9", + "properties": { + "type": "external", + "description": "awesome group of people", + "builtIn": false, + "displayName": "AwesomeGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca" + } + } + } + }, + "operationId": "Group_Get", + "title": "ApiManagementGetGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json new file mode 100644 index 0000000000..e99ea1b161 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "groupId": "59306a29e4bbd510dc24e5f9", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Group_GetEntityTag", + "title": "ApiManagementHeadGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json new file mode 100644 index 0000000000..d87b15f960 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_ListByService.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 4, + "nextLink": "", + "value": [ + { + "name": "5600b59375ff190048020001", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020001", + "properties": { + "type": "system", + "description": "Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.", + "builtIn": true, + "displayName": "Administrators" + } + }, + { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/59306a29e4bbd510dc24e5f9", + "properties": { + "type": "external", + "description": "awesome group of people", + "builtIn": false, + "displayName": "AwesomeGroup (samiraad.onmicrosoft.com)", + "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca" + } + }, + { + "name": "5600b59375ff190048020002", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020002", + "properties": { + "type": "system", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "displayName": "Developers" + } + }, + { + "name": "5600b59375ff190048020003", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/5600b59375ff190048020003", + "properties": { + "type": "system", + "description": "Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.", + "builtIn": true, + "displayName": "Guests" + } + } + ] + } + } + }, + "operationId": "Group_ListByService", + "title": "ApiManagementListGroups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json new file mode 100644 index 0000000000..a38cc3d079 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Group_Update.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "groupId": "tempgroup", + "parameters": { + "properties": { + "displayName": "temp group" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "tempgroup", + "type": "Microsoft.ApiManagement/service/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/groups/tempgroup", + "properties": { + "type": "external", + "description": "awesome group of people", + "builtIn": false, + "displayName": "tempgroup", + "externalId": "aad://samiraad.onmicrosoft.com/groups/3773adf4-032e-4d25-9988-eaff9ca72eca" + } + } + } + }, + "operationId": "Group_Update", + "title": "ApiManagementUpdateGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json new file mode 100644 index 0000000000..07f97d786c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_CreateOrUpdate.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "facebook", + "parameters": { + "properties": { + "clientId": "facebookid", + "clientSecret": "facebookapplicationsecret" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "Facebook", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Facebook", + "properties": { + "type": "facebook", + "clientId": "facebookid" + } + } + }, + "201": { + "body": { + "name": "Facebook", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Facebook", + "properties": { + "type": "facebook", + "clientId": "facebookid" + } + } + } + }, + "operationId": "IdentityProvider_CreateOrUpdate", + "title": "ApiManagementCreateIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json new file mode 100644 index 0000000000..b32b62835a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "identityProviderName": "aad", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "IdentityProvider_Delete", + "title": "ApiManagementDeleteIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json new file mode 100644 index 0000000000..5b79d1e875 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "aadB2C", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "AadB2C", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C", + "properties": { + "type": "aadB2C", + "allowedTenants": [ + "contosoaadb2c.onmicrosoft.com", + "contoso2aadb2c.onmicrosoft.com" + ], + "authority": "login.microsoftonline.com", + "clientId": "f02dafe2-b8b8-48ec-a38e-27e5c16c51e5", + "signinPolicyName": "B2C_1_policy-signin", + "signinTenant": "contosoaadb2c.onmicrosoft.com", + "signupPolicyName": "B2C_1_policy-signup" + } + } + } + }, + "operationId": "IdentityProvider_Get", + "title": "ApiManagementGetIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json new file mode 100644 index 0000000000..0c3c358ef5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "aadB2C", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "IdentityProvider_GetEntityTag", + "title": "ApiManagementHeadIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json new file mode 100644 index 0000000000..63e53a0b91 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListByService.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "Google", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Google", + "properties": { + "type": "google", + "clientId": "googleId" + } + }, + { + "name": "Aad", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/Aad", + "properties": { + "type": "aad", + "allowedTenants": [ + "samiraad.onmicrosoft.com" + ], + "clientId": "aadapplicationid" + } + }, + { + "name": "AadB2C", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C", + "properties": { + "type": "aadB2C", + "allowedTenants": [ + "samirtestbc.onmicrosoft.com" + ], + "clientId": "aadb2clientId", + "signinPolicyName": "B2C_1_Signin_Default", + "signupPolicyName": "B2C_1_Signup_Default" + } + } + ] + } + } + }, + "operationId": "IdentityProvider_ListByService", + "title": "ApiManagementListIdentityProviders" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json new file mode 100644 index 0000000000..92f33dbcef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_ListSecrets.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "identityProviderName": "aadB2C", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "clientSecret": "XXXXXXX" + } + } + }, + "operationId": "IdentityProvider_ListSecrets", + "title": "ApiManagementIdentityProviderListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json new file mode 100644 index 0000000000..ddc2d279f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/IdentityProvider_Update.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "identityProviderName": "facebook", + "parameters": { + "properties": { + "clientId": "updatedfacebookid", + "clientSecret": "updatedfacebooksecret" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "AadB2C", + "type": "Microsoft.ApiManagement/service/identityProviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/identityProviders/AadB2C", + "properties": { + "type": "aadB2C", + "allowedTenants": [ + "contosoaadb2c.onmicrosoft.com", + "contoso2aadb2c.onmicrosoft.com" + ], + "authority": "login.microsoftonline.com", + "clientId": "f02dafe2-b8b8-48ec-a38e-27e5c16c51e5", + "signinPolicyName": "B2C_1_policy-signin", + "signinTenant": "contosoaadb2c.onmicrosoft.com", + "signupPolicyName": "B2C_1_policy-signup" + } + } + } + }, + "operationId": "IdentityProvider_Update", + "title": "ApiManagementUpdateIdentityProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json new file mode 100644 index 0000000000..1b83a294d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateAiLogger.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "loggerId", + "parameters": { + "properties": { + "description": "adding a new logger", + "credentials": { + "instrumentationKey": "11................a1" + }, + "loggerType": "applicationInsights" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "loggerId", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId", + "properties": { + "description": null, + "credentials": { + "instrumentationKey": "{{5a.......2a}}" + }, + "isBuffered": false, + "loggerType": "applicationInsights" + } + } + }, + "201": { + "body": { + "name": "loggerId", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/loggerId", + "properties": { + "description": null, + "credentials": { + "instrumentationKey": "{{5a.......2a}}" + }, + "isBuffered": false, + "loggerType": "applicationInsights", + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/microsoft.insights/components/airesource" + } + } + } + }, + "operationId": "Logger_CreateOrUpdate", + "title": "ApiManagementCreateAILogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json new file mode 100644 index 0000000000..f6a320c60c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_CreateOrUpdate_ApiManagementCreateEhLogger.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "eh1", + "parameters": { + "properties": { + "description": "adding a new logger", + "credentials": { + "name": "hydraeventhub", + "connectionString": "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" + }, + "loggerType": "azureEventHub" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "eh1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1", + "properties": { + "description": "adding a new logger", + "credentials": { + "connectionString": "{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}" + }, + "isBuffered": true, + "loggerType": "azureEventHub" + } + } + }, + "201": { + "body": { + "name": "eh1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1", + "properties": { + "description": "adding a new logger", + "credentials": { + "connectionString": "{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}" + }, + "isBuffered": true, + "loggerType": "azureEventHub" + } + } + } + }, + "operationId": "Logger_CreateOrUpdate", + "title": "ApiManagementCreateEHLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json new file mode 100644 index 0000000000..9b19192374 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "loggerId": "loggerId", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Logger_Delete", + "title": "ApiManagementDeleteLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json new file mode 100644 index 0000000000..aab585973b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "templateLogger", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "kloudapilogger1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/kloudapilogger1", + "properties": { + "description": "testeventhub3again", + "credentials": { + "name": "testeventhub4", + "connectionString": "Endpoint=sb://eventhubapim.servicebus.windows.net/;SharedAccessKeyName=Sender;SharedAccessKey=************" + }, + "isBuffered": true, + "loggerType": "azureEventHub", + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/eventhubapim" + } + } + } + }, + "operationId": "Logger_Get", + "title": "ApiManagementGetLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json new file mode 100644 index 0000000000..e16614ef3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "loggerId": "templateLogger", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Logger_GetEntityTag", + "title": "ApiManagementHeadLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json new file mode 100644 index 0000000000..054b3ebfc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_ListByService.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "azuremonitor", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/azuremonitor", + "properties": { + "isBuffered": true, + "loggerType": "azureMonitor" + } + }, + { + "name": "vvktest", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/vvktest", + "properties": { + "credentials": { + "instrumentationKey": "{{Logger-Credentials-5b1a17ef2b3f91153004b10d}}" + }, + "isBuffered": true, + "loggerType": "applicationInsights" + } + }, + { + "name": "applicationinsights", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/applicationinsights", + "properties": { + "description": "miaoappinsight", + "credentials": { + "instrumentationKey": "{{Logger-Credentials-5b2056062b3f911ae84a3069}}" + }, + "isBuffered": true, + "loggerType": "applicationInsights" + } + } + ] + } + } + }, + "operationId": "Logger_ListByService", + "title": "ApiManagementListLoggers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json new file mode 100644 index 0000000000..46078a8f18 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Logger_Update.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "loggerId": "eh1", + "parameters": { + "properties": { + "description": "updating description", + "loggerType": "azureEventHub" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "eh1", + "type": "Microsoft.ApiManagement/service/loggers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/loggers/eh1", + "properties": { + "description": "updating description", + "credentials": { + "connectionString": "{{Logger-Credentials-5f28745bbebeeb13cc3f7301}}" + }, + "isBuffered": true, + "loggerType": "azureEventHub" + } + } + } + }, + "operationId": "Logger_Update", + "title": "ApiManagementUpdateLogger" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json new file mode 100644 index 0000000000..b253fe8ee7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValue.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "parameters": { + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop2", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + } + }, + "201": { + "body": { + "name": "testprop2", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "NamedValue_CreateOrUpdate", + "title": "ApiManagementCreateNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json new file mode 100644 index 0000000000..9cf30d88a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop6", + "parameters": { + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + }, + "201": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "NamedValue_CreateOrUpdate", + "title": "ApiManagementCreateNamedValueWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json new file mode 100644 index 0000000000..8dd43a560c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "NamedValue_Delete", + "title": "ApiManagementDeleteNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json new file mode 100644 index 0000000000..b2055a18ac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testarmTemplateproperties2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "NamedValue_GetEntityTag", + "title": "ApiManagementHeadNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json new file mode 100644 index 0000000000..b51fa4ac32 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValue.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testarmTemplateproperties2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testarmTemplateproperties2", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testarmTemplateproperties2", + "properties": { + "displayName": "propName", + "secret": false, + "tags": [ + "foo", + "bar" + ], + "value": "propValue" + } + } + } + }, + "operationId": "NamedValue_Get", + "title": "ApiManagementGetNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json new file mode 100644 index 0000000000..34bb4e1ae7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Get_ApiManagementGetNamedValueWithKeyVault.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop6", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + } + }, + "operationId": "NamedValue_Get", + "title": "ApiManagementGetNamedValueWithKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json new file mode 100644 index 0000000000..7bb62a6bd3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListByService.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "592f1174cc83890dc4f32686", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/592f1174cc83890dc4f32686", + "properties": { + "displayName": "Logger-Credentials-592f1174cc83890dc4f32687", + "secret": false, + "value": "propValue" + } + }, + { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://contoso.vault.azure.net/secrets/aadSecret" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + ] + } + } + }, + "operationId": "NamedValue_ListByService", + "title": "ApiManagementListNamedValues" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json new file mode 100644 index 0000000000..b73e374dc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_ListValue.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testarmTemplateproperties2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": "propValue" + } + } + }, + "operationId": "NamedValue_ListValue", + "title": "ApiManagementNamedValueListValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json new file mode 100644 index 0000000000..c48a1c75c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_RefreshSecret.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testprop6", + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6", + "properties": { + "displayName": "prop6namekv", + "keyVault": { + "identityClientId": "2d2df842-44d8-4885-8dec-77cc1a984a31", + "lastStatus": { + "code": "Success", + "timeStampUtc": "2020-09-11T00:54:31.8024882Z" + }, + "secretIdentifier": "https://rpbvtkeyvaultintegration.vault.azure.net/secrets/msitestingCert" + }, + "secret": true, + "tags": [ + "foo", + "bar" + ] + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop6/refreshSecret?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "NamedValue_RefreshSecret", + "title": "ApiManagementRefreshNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json new file mode 100644 index 0000000000..95d9d2ddd0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NamedValue_Update.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "namedValueId": "testprop2", + "parameters": { + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar2" + ], + "value": "propValue" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.ApiManagement/service/namedValues", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "displayName": "prop3name", + "secret": false, + "tags": [ + "foo", + "bar2" + ], + "value": "propValue" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=204" + } + } + }, + "operationId": "NamedValue_Update", + "title": "ApiManagementUpdateNamedValue" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json new file mode 100644 index 0000000000..9e75833d0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByLocation.json @@ -0,0 +1,148 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "locationName": "North Central US", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "connectivityStatus": [ + { + "name": "apimgmtst6tnxxxxxxxxxxx.blob.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:14.7035899Z", + "resourceType": "BlobStorage", + "status": "success" + }, + { + "name": "apimgmtst6tnxxxxxxxxxxx.file.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9265938Z", + "lastUpdated": "2020-11-24T22:55:41.5322463Z", + "resourceType": "FileStorage", + "status": "success" + }, + { + "name": "apimgmtst6tnxxxxxxxxxxx.queue.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:30.645994Z", + "resourceType": "Queue", + "status": "success" + }, + { + "name": "apimgmtst6tnxxxxxxxxxxx.table.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:23.8789171Z", + "resourceType": "TableStorage", + "status": "success" + }, + { + "name": "gcs.prod.monitoring.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T08:07:37.5486932Z", + "lastUpdated": "2020-11-24T22:57:34.8666833Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://gcs.ppe.warm.ingestion.monitoring.azure.com", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:26.1870188Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://global.metrics.nsatc.net/", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.0510519Z", + "lastUpdated": "2020-11-24T22:56:35.9620612Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://login.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:30.8047708Z", + "resourceType": "AzureActiveDirectory", + "status": "success" + }, + { + "name": "https://prod2.metrics.nsatc.net:1886/RecoveryService", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.2796235Z", + "lastUpdated": "2020-11-24T22:56:45.2095302Z", + "resourceType": "Metrics", + "status": "success" + }, + { + "name": "LocalGatewayRedis", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:15.1345836Z", + "resourceType": "InternalCache", + "status": "success" + }, + { + "name": "prod.warmpath.msftcloudes.com", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:57.8992141Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "Scm", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:57.325384Z", + "lastUpdated": "2020-11-24T23:03:57.6187917Z", + "resourceType": "SourceControl", + "status": "success" + }, + { + "name": "smtpi-xxx.msn.com:25028", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.3510577Z", + "lastUpdated": "2020-11-24T22:58:22.2430074Z", + "resourceType": "Email", + "status": "success" + }, + { + "name": "zwcvuxxxx.database.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:56.0410467Z", + "lastUpdated": "2020-11-24T22:55:44.3582171Z", + "resourceType": "SQLDatabase", + "status": "success" + } + ], + "dnsServers": [ + "10.82.98.10" + ] + } + } + }, + "operationId": "NetworkStatus_ListByLocation", + "title": "ApiManagementServiceGetNetworkStatusByLocation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json new file mode 100644 index 0000000000..e037e56c19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NetworkStatus_ListByService.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": [ + { + "location": "West US", + "networkStatus": { + "connectivityStatus": [ + { + "name": "apimgmtst6xxxxxxxxxxx.blob.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:14.7035899Z", + "resourceType": "BlobStorage", + "status": "success" + }, + { + "name": "apimgmtst6xxxxxxxxxxx.file.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9265938Z", + "lastUpdated": "2020-11-24T22:55:41.5322463Z", + "resourceType": "FileStorage", + "status": "success" + }, + { + "name": "apimgmtst6xxxxxxxxxxx.queue.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:30.645994Z", + "resourceType": "Queue", + "status": "success" + }, + { + "name": "apimgmtst6xxxxxxxxxxx.table.core.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:23.8789171Z", + "resourceType": "TableStorage", + "status": "success" + }, + { + "name": "gcs.prod.monitoring.core.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T08:07:37.5486932Z", + "lastUpdated": "2020-11-24T22:57:34.8666833Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://gcs.ppe.warm.ingestion.monitoring.azure.com", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:26.1870188Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://global.metrics.nsatc.net/", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.0510519Z", + "lastUpdated": "2020-11-24T22:56:35.9620612Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "https://login.windows.net", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.1060523Z", + "lastUpdated": "2020-11-24T22:56:30.8047708Z", + "resourceType": "AzureActiveDirectory", + "status": "success" + }, + { + "name": "https://prod2.metrics.nsatc.net:1886/RecoveryService", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.2796235Z", + "lastUpdated": "2020-11-24T22:56:45.2095302Z", + "resourceType": "Metrics", + "status": "success" + }, + { + "name": "LocalGatewayRedis", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:55.9365931Z", + "lastUpdated": "2020-11-24T22:55:15.1345836Z", + "resourceType": "InternalCache", + "status": "success" + }, + { + "name": "prod.warmpath.msftcloudes.com", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:55.8410477Z", + "lastUpdated": "2020-11-24T22:55:57.8992141Z", + "resourceType": "Monitoring", + "status": "success" + }, + { + "name": "Scm", + "error": "", + "isOptional": true, + "lastStatusChange": "2019-07-20T02:25:48.7066996Z", + "lastUpdated": "2020-11-24T23:01:24.0553684Z", + "resourceType": "SourceControl", + "status": "success" + }, + { + "name": "smtpi-ch1.msn.com:25028", + "error": "", + "isOptional": true, + "lastStatusChange": "2020-11-20T07:54:56.3510577Z", + "lastUpdated": "2020-11-24T22:58:22.2430074Z", + "resourceType": "Email", + "status": "success" + }, + { + "name": "zwcvuxxxx.database.windows.net", + "error": "", + "isOptional": false, + "lastStatusChange": "2020-11-20T07:54:56.0410467Z", + "lastUpdated": "2020-11-24T22:55:44.3582171Z", + "resourceType": "SQLDatabase", + "status": "success" + } + ], + "dnsServers": [ + "10.82.98.10" + ] + } + } + ] + } + }, + "operationId": "NetworkStatus_ListByService", + "title": "ApiManagementServiceGetNetworkStatus" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json new file mode 100644 index 0000000000..b32464ac80 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientEmail_ListByNotification.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "contoso@live.com", + "type": "Microsoft.ApiManagement/service/notifications/recipientEmails", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com", + "properties": { + "email": "contoso@live.com" + } + }, + { + "name": "foobar!live", + "type": "Microsoft.ApiManagement/service/notifications/recipientEmails", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar!live", + "properties": { + "email": "foobar!live" + } + }, + { + "name": "foobar@live.com", + "type": "Microsoft.ApiManagement/service/notifications/recipientEmails", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com", + "properties": { + "email": "foobar@live.com" + } + } + ] + } + } + }, + "operationId": "NotificationRecipientEmail_ListByNotification", + "title": "ApiManagementListNotificationRecipientEmails" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json new file mode 100644 index 0000000000..6ff0e9faab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/NotificationRecipientUser_ListByNotification.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "576823d0a40f7e74ec07d642", + "type": "Microsoft.ApiManagement/service/notifications/recipientUsers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientUsers/576823d0a40f7e74ec07d642", + "properties": { + "userId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + } + } + ] + } + } + }, + "operationId": "NotificationRecipientUser_ListByNotification", + "title": "ApiManagementListNotificationRecipientUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json new file mode 100644 index 0000000000..32313e9eb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "RequestPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/contoso@live.com", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar!live", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + ] + }, + "title": "Subscription requests (requiring approval)" + } + } + } + }, + "operationId": "Notification_CreateOrUpdate", + "title": "ApiManagementCreateNotification" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json new file mode 100644 index 0000000000..e31e85669d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "notificationName": "RequestPublisherNotificationMessage", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "RequestPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/contoso@live.com", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar!live", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/recipientEmails/foobar@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + ] + }, + "title": "Subscription requests (requiring approval)" + } + } + } + }, + "operationId": "Notification_Get", + "title": "ApiManagementGetNotification" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json new file mode 100644 index 0000000000..0c27b5b6bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Notification_ListByService.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 7, + "nextLink": "", + "value": [ + { + "name": "RequestPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about subscription requests for API products requiring approval.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar!live", + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/foobar@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/576823d0a40f7e74ec07d642" + ] + }, + "title": "Subscription requests (requiring approval)" + } + }, + { + "name": "PurchasePublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/PurchasePublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications about new API product subscriptions.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com" + ], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + ] + }, + "title": "New subscriptions" + } + }, + { + "name": "NewApplicationNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/NewApplicationNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications when new applications are submitted to the application gallery.", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com" + ], + "users": [] + }, + "title": "Application gallery requests" + } + }, + { + "name": "BCC", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/BCC", + "properties": { + "description": "The following recipients will receive blind carbon copies of all emails sent to developers.", + "recipients": { + "emails": [], + "users": [] + }, + "title": "BCC" + } + }, + { + "name": "NewIssuePublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/NewIssuePublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal.", + "recipients": { + "emails": [], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + ] + }, + "title": "New issue or comment" + } + }, + { + "name": "AccountClosedPublisher", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/AccountClosedPublisher", + "properties": { + "description": "The following email recipients and users will receive email notifications when developer closes his account", + "recipients": { + "emails": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/RequestPublisherNotificationMessage/recipientEmails/contoso@live.com" + ], + "users": [] + }, + "title": "Close account message" + } + }, + { + "name": "QuotaLimitApproachingPublisherNotificationMessage", + "type": "Microsoft.ApiManagement/service/notifications", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/notifications/QuotaLimitApproachingPublisherNotificationMessage", + "properties": { + "description": "The following email recipients and users will receive email notifications when subscription usage gets close to usage quota.", + "recipients": { + "emails": [], + "users": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1" + ] + }, + "title": "Approaching subscription quota limit" + } + } + ] + } + } + }, + "operationId": "Notification_ListByService", + "title": "ApiManagementListNotifications" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json new file mode 100644 index 0000000000..c7c0aa879f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_CreateOrUpdate.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect3", + "parameters": { + "properties": { + "clientId": "oidprovidertemplate3", + "clientSecret": "x", + "displayName": "templateoidprovider3", + "metadataEndpoint": "https://oidprovider-template3.net" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateOpenIdConnect3", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect3", + "properties": { + "clientId": "oidprovidertemplate3", + "displayName": "templateoidprovider3", + "metadataEndpoint": "https://oidprovider-template3.net" + } + } + }, + "201": { + "body": { + "name": "templateOpenIdConnect3", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect3", + "properties": { + "clientId": "oidprovidertemplate3", + "displayName": "templateoidprovider3", + "metadataEndpoint": "https://oidprovider-template3.net" + } + } + } + }, + "operationId": "OpenIdConnectProvider_CreateOrUpdate", + "title": "ApiManagementCreateOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json new file mode 100644 index 0000000000..61d3170f4d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "OpenIdConnectProvider_Delete", + "title": "ApiManagementDeleteOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json new file mode 100644 index 0000000000..c4326d9d76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateOpenIdConnect2", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2", + "properties": { + "description": "open id provider template2", + "clientId": "oidprovidertemplate2", + "displayName": "templateoidprovider2", + "metadataEndpoint": "https://oidprovider-template2.net" + } + } + } + }, + "operationId": "OpenIdConnectProvider_Get", + "title": "ApiManagementGetOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json new file mode 100644 index 0000000000..5a2fbffc15 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListByService.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "templateOpenIdConnect2", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2", + "properties": { + "description": "open id provider template2", + "clientId": "oidprovidertemplate2", + "displayName": "templateoidprovider2", + "metadataEndpoint": "https://oidprovider-template2.net" + } + } + ] + } + } + }, + "operationId": "OpenIdConnectProvider_ListByService", + "title": "ApiManagementListOpenIdConnectProviders" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json new file mode 100644 index 0000000000..8f7b4329e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_ListSecrets.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect2", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "clientSecret": "oidsecretproviderTemplate2" + } + } + }, + "operationId": "OpenIdConnectProvider_ListSecrets", + "title": "ApiManagementOpenidConnectProviderListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json new file mode 100644 index 0000000000..788f66b05a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OpenIdConnectProvider_Update.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "opid": "templateOpenIdConnect2", + "parameters": { + "properties": { + "clientSecret": "updatedsecret" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "templateOpenIdConnect2", + "type": "Microsoft.ApiManagement/service/openidconnectproviders", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/openidConnectProviders/templateOpenIdConnect2", + "properties": { + "description": "open id provider template2", + "clientId": "oidprovidertemplate2", + "displayName": "templateoidprovider2", + "metadataEndpoint": "https://oidprovider-template2.net" + } + } + } + }, + "operationId": "OpenIdConnectProvider_Update", + "title": "ApiManagementUpdateOpenIdConnectProvider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json new file mode 100644 index 0000000000..2813c968de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Operation_ListByTags.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "apiId": "a1", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "operation": { + "name": "Create resource", + "method": "POST", + "description": "A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.", + "apiName": "Echo API", + "apiRevision": "1", + "id": "/apis/echo-api/operations/create-resource", + "urlTemplate": "/resource" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "Operation_ListByTags", + "title": "ApiManagementListApiOperationsByTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json new file mode 100644 index 0000000000..c6e819b2b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/OutboundNetworkDependenciesEndpoints_ListByService.json @@ -0,0 +1,465 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "category": "Azure SMTP", + "endpoints": [ + { + "domainName": "smtpi-ch1.msn.com", + "endpointDetails": [ + { + "port": 25028, + "region": "West US" + } + ] + } + ] + }, + { + "category": "Azure SQL", + "endpoints": [ + { + "domainName": "xxxx1345234.database.windows.net", + "endpointDetails": [ + { + "port": 1433, + "region": "West US" + } + ] + } + ] + }, + { + "category": "Azure Storage", + "endpoints": [ + { + "domainName": "xxxx32storagedgfbay.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1362629927xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1362629927xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx141483183xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx141483183xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1949864718xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1949864718xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx3292114122xt.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx3292114122xt.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.blob.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.file.core.windows.net", + "endpointDetails": [ + { + "port": 445, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.queue.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx32tst4oto8t0mlesawmm.table.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + } + ] + } + ] + }, + { + "category": "Azure Event Hub", + "endpoints": [ + { + "domainName": "xxxx1362629927eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx1949864718eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx3292114122eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + }, + { + "domainName": "xxxx141483183eh.servicebus.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "West US" + }, + { + "port": 5671, + "region": "West US" + }, + { + "port": 5672, + "region": "West US" + } + ] + } + ] + }, + { + "category": "SSL Certificate Verification", + "endpoints": [ + { + "domainName": "ocsp.msocsp.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "mscrl.microsoft.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "crl.microsoft.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "crl3.digicert.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "ocsp.digicert.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "cacerts.digicert.com", + "endpointDetails": [ + { + "port": 80, + "region": "Global" + }, + { + "port": 443, + "region": "Global" + } + ] + } + ] + }, + { + "category": "Azure Monitor", + "endpoints": [ + { + "domainName": "gcs.ppe.monitoring.core.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "global.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "xxx3.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 1886, + "region": "Global" + } + ] + }, + { + "domainName": "xxx3-red.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 1886, + "region": "Global" + } + ] + }, + { + "domainName": "xxx3-black.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 1886, + "region": "Global" + } + ] + }, + { + "domainName": "gcs.ppe.warm.ingestion.monitoring.azure.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "metrichost23.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "metrichost23-red.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "metrichost23-black.prod.microsoftmetrics.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + } + ] + }, + { + "category": "Portal Captcha", + "endpoints": [ + { + "domainName": "client.xxx.live.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "partner.xxx.live.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + } + ] + }, + { + "category": "Azure Active Directory", + "endpoints": [ + { + "domainName": "login.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "graph.windows.net", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + }, + { + "domainName": "login.microsoftonline.com", + "endpointDetails": [ + { + "port": 443, + "region": "Global" + } + ] + } + ] + } + ] + } + } + }, + "operationId": "OutboundNetworkDependenciesEndpoints_ListByService", + "title": "ApiManagementServiceGetOutboundNetworkDependenciesEndpoints" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json new file mode 100644 index 0000000000..deae7f2763 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_HttpConnectivityCheck.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "connectivityCheckRequestParams": { + "destination": { + "address": "https://microsoft.com", + "port": 3306 + }, + "protocolConfiguration": { + "HTTPConfiguration": { + "method": "GET", + "headers": [ + { + "name": "Authorization", + "value": "Bearer myPreciousToken" + } + ], + "validStatusCodes": [ + 200, + 204 + ] + } + }, + "source": { + "region": "northeurope" + }, + "protocol": "HTTPS" + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "avgLatencyInMs": 260, + "connectionStatus": "Reachable", + "hops": [ + { + "type": "Source", + "address": "20.82.216.48", + "id": "c60e2296-5ebc-48cc-80e8-7e6d2981e7b2", + "issues": [], + "nextHopIds": [ + "26aa44e7-04f1-462f-aa5d-5951957b5650" + ], + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1" + }, + { + "type": "Internet", + "address": "40.113.200.201", + "id": "26aa44e7-04f1-462f-aa5d-5951957b5650", + "issues": [], + "nextHopIds": [] + } + ], + "maxLatencyInMs": 281, + "minLatencyInMs": 250, + "probesFailed": 0, + "probesSent": 3 + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-08-01" + } + } + }, + "operationId": "PerformConnectivityCheckAsync", + "title": "HTTP Connectivity Check" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json new file mode 100644 index 0000000000..6f125f618d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PerformConnectivityCheckAsync_TcpConnectivityCheck.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "connectivityCheckRequestParams": { + "destination": { + "address": "8.8.8.8", + "port": 53 + }, + "preferredIPVersion": "IPv4", + "source": { + "region": "northeurope" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "avgLatencyInMs": 1, + "connectionStatus": "Connected", + "hops": [ + { + "type": "Source", + "address": "10.1.1.4", + "id": "7dbbe7aa-60ba-4650-831e-63d775d38e9e", + "issues": [], + "nextHopIds": [ + "75c8d819-b208-4584-a311-1aa45ce753f9" + ], + "resourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1" + }, + { + "type": "Internet", + "address": "8.8.8.8", + "id": "75c8d819-b208-4584-a311-1aa45ce753f9", + "issues": [], + "nextHopIds": [] + } + ], + "maxLatencyInMs": 4, + "minLatencyInMs": 1, + "probesFailed": 0, + "probesSent": 100 + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/connectivityCheck/operationresults/bmljb2xhLW5ldHdvcmt3YXRjaGVyNF9Db25uZWN0aXRpdml0eUNoZWNrXzE2MmExNmZl?api-version=2021-08-01" + } + } + }, + "operationId": "PerformConnectivityCheckAsync", + "title": "TCP Connectivity Check" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json new file mode 100644 index 0000000000..a8378e1ad7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PolicyDescription_ListByService.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "scope": "Api", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "value": [ + { + "name": "authentication-basic", + "type": "Microsoft.ApiManagement/service/policyDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-basic", + "properties": { + "description": "Authenticate with the backend service using Basic authentication. Use in the inbound section at API scope.", + "scope": 268435471 + } + }, + { + "name": "authentication-certificate", + "type": "Microsoft.ApiManagement/service/policyDescriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/policyDescriptions/authentication-certificate", + "properties": { + "description": "Authenticate with the backend service using a client certificate. Use in the inbound section at API scope.", + "scope": 268435471 + } + } + ] + } + } + }, + "operationId": "PolicyDescription_ListByService", + "title": "ApiManagementListPolicyDescriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json new file mode 100644 index 0000000000..379c8929e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_CreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "portal revision 1", + "isCurrent": true + } + }, + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "201": { + "body": { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010", + "properties": { + "description": "portal revision 1", + "createdDateTime": "2020-11-13T22:28:43.657Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-13T22:29:22.68Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010?api-version=2021-08-01&asyncId=5faf089b1d9a026694220e0c&asyncCode=201" + } + } + }, + "operationId": "PortalRevision_CreateOrUpdate", + "title": "ApiManagementCreatePortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json new file mode 100644 index 0000000000..8019856ba0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010", + "properties": { + "description": "portal revision 1", + "createdDateTime": "2020-11-12T22:51:36.47Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-12T22:52:00.097Z" + } + } + } + }, + "operationId": "PortalRevision_Get", + "title": "ApiManagementGetPortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json new file mode 100644 index 0000000000..d8bb34f861 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "PortalRevision_GetEntityTag", + "title": "ApiManagementHeadPortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json new file mode 100644 index 0000000000..df06fea351 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_ListByService.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "20201112000000", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112000000", + "properties": { + "description": "portal revision", + "createdDateTime": "2020-11-12T22:10:09.673Z", + "isCurrent": false, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-12T22:12:41.46Z" + } + }, + { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010", + "properties": { + "description": "portal revision 1", + "createdDateTime": "2020-11-12T22:51:36.47Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-12T22:52:00.097Z" + } + } + ] + } + } + }, + "operationId": "PortalRevision_ListByService", + "title": "ApiManagementListPortalRevisions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json new file mode 100644 index 0000000000..4d05c559df --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalRevision_Update.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "description": "portal revision update", + "isCurrent": true + } + }, + "portalRevisionId": "20201112101010", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "20201112101010", + "type": "Microsoft.ApiManagement/service/portalRevisions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/namedValues/testprop2", + "properties": { + "description": "portal revision update", + "createdDateTime": "2020-11-13T22:47:13.397Z", + "isCurrent": true, + "status": "completed", + "statusDetails": null, + "updatedDateTime": "2020-11-13T23:29:25.34Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalRevisions/20201112101010?api-version=2021-08-01&asyncId=5faf16b81d9a028970d0bfbb&asyncCode=200" + } + } + }, + "operationId": "PortalRevision_Update", + "title": "ApiManagementUpdatePortalRevision" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json new file mode 100644 index 0000000000..a8a6a3b428 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PortalSettings_ListByService.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "value": [ + { + "name": "delegation", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/delegation", + "properties": { + "enabled": false, + "subscriptions": { + "enabled": false + }, + "userRegistration": { + "enabled": false + } + } + }, + { + "name": "signin", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin", + "properties": { + "enabled": false + } + }, + { + "name": "signup", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup", + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": false, + "enabled": false, + "text": "Terms of service" + } + } + } + ] + } + } + }, + "operationId": "PortalSettings_ListByService", + "title": "ApiManagementListPortalSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json new file mode 100644 index 0000000000..46941b9dde --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_CreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "privateEndpointConnectionRequest": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + "properties": { + "privateLinkServiceConnectionState": { + "description": "The Private Endpoint Connection is approved.", + "status": "Approved" + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointConnectionName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "The request has been approved.", + "status": "Succeeded" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + } + }, + "operationId": "PrivateEndpointConnection_CreateOrUpdate", + "title": "ApiManagementApproveOrRejectPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json new file mode 100644 index 0000000000..7c347bab82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2021-08-01&asyncId=5c730e343244df1b9cb56e85&asyncCode=201" + } + }, + "204": {} + }, + "operationId": "PrivateEndpointConnection_Delete", + "title": "ApiManagementDeletePrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json new file mode 100644 index 0000000000..173a59fae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetByName.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateEndpointConnectionName": "privateEndpointConnectionName", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "privateEndpointProxyName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + } + } + }, + "operationId": "PrivateEndpointConnection_GetByName", + "title": "ApiManagementGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json new file mode 100644 index 0000000000..3f4dc5c91b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_GetPrivateLinkResource.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "privateLinkSubResourceName": "privateLinkSubResourceName", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "Gateway", + "type": "Microsoft.ApiManagement/service/privateLinkResources", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateLinkResources/Gateway", + "properties": { + "groupId": "Gateway", + "requiredMembers": [ + "Gateway" + ], + "requiredZoneNames": [ + "privateLink.azure-api.net" + ] + } + } + } + }, + "operationId": "PrivateEndpointConnection_GetPrivateLinkResource", + "title": "ApiManagementGetPrivateLinkGroupResource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json new file mode 100644 index 0000000000..f69a08da27 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListByService.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "privateEndpointProxyName", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/connectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + }, + { + "name": "privateEndpointProxyName2", + "type": "Microsoft.ApiManagement/service/privateEndpointConnections", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateEndpointConnections/privateEndpointProxyName2", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/privateEndpoints/privateEndpointName2" + }, + "privateLinkServiceConnectionState": { + "description": "Please approve my request, thanks", + "actionsRequired": "None", + "status": "Pending" + }, + "provisioningState": "Pending" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnection_ListByService", + "title": "ApiManagementListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json new file mode 100644 index 0000000000..874cbea23f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/PrivateEndpointConnection_ListPrivateLinkResources.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Gateway", + "type": "Microsoft.ApiManagement/service/privateLinkResources", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/privateLinkResources/Gateway", + "properties": { + "groupId": "Gateway", + "requiredMembers": [ + "Gateway" + ], + "requiredZoneNames": [ + "privateLink.azure-api.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnection_ListPrivateLinkResources", + "title": "ApiManagementListPrivateLinkGroupResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json new file mode 100644 index 0000000000..0bd73fadb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductApi_ListByProduct.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "5768181ea40f7eb6c49f6ac7", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "57681820a40f7eb6c49f6aca", + "type": "Microsoft.ApiManagement/service/products/apis", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5768181ea40f7eb6c49f6ac7/apis/57681820a40f7eb6c49f6aca", + "properties": { + "path": "suffix_57681820a40f7eb6c49f6ace", + "description": "description_57681820a40f7eb6c49f6acc", + "apiRevision": "1", + "displayName": "api_57681820a40f7eb6c49f6acb", + "isCurrent": true, + "protocols": [ + "https" + ], + "serviceUrl": "http://contoso/57681820a40f7eb6c49f6acd" + } + } + ] + } + } + }, + "operationId": "ProductApi_ListByProduct", + "title": "ApiManagementListProductApis" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json new file mode 100644 index 0000000000..ba28b0b887 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductGroup_ListByProduct.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "5600b57e7e8880006a060002", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "5600b57e7e8880006a020001", + "type": "Microsoft.ApiManagement/service/products/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020001", + "properties": { + "type": "system", + "description": "Administrators is a built-in group. Its membership is managed by the system. Microsoft Azure subscription administrators fall into this group.", + "builtIn": true, + "displayName": "Administrators" + } + }, + { + "name": "5600b57e7e8880006a020002", + "type": "Microsoft.ApiManagement/service/products/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020002", + "properties": { + "type": "system", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "displayName": "Developers" + } + }, + { + "name": "5600b57e7e8880006a020003", + "type": "Microsoft.ApiManagement/service/products/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/groups/5600b57e7e8880006a020003", + "properties": { + "type": "system", + "description": "Guests is a built-in group. Its membership is managed by the system. Unauthenticated users visiting the developer portal fall into this group.", + "builtIn": true, + "displayName": "Guests" + } + } + ] + } + } + }, + "operationId": "ProductGroup_ListByProduct", + "title": "ApiManagementListProductGroups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json new file mode 100644 index 0000000000..f11c762ba2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/ProductSubscriptions_List.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "5600b57e7e8880006a060002", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b57e7e8880006a070002", + "type": "Microsoft.ApiManagement/service/products/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002/subscriptions/5600b57e7e8880006a070002", + "properties": { + "createdDate": "2015-09-22T01:57:18.723Z", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b57e7e8880006a060002", + "state": "active" + } + } + ] + } + } + }, + "operationId": "ProductSubscriptions_List", + "title": "ApiManagementListProductSubscriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json new file mode 100644 index 0000000000..ca5ff6ebb7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_CreateOrUpdate.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "Test Template ProductName 4" + } + }, + "productId": "testproduct", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testproduct", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct", + "properties": { + "approvalRequired": false, + "displayName": "Test Template ProductName 4", + "state": "notPublished", + "subscriptionRequired": true + } + } + }, + "201": { + "body": { + "name": "testproduct", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct", + "properties": { + "approvalRequired": false, + "displayName": "Test Template ProductName 4", + "state": "notPublished", + "subscriptionRequired": true + } + } + } + }, + "operationId": "Product_CreateOrUpdate", + "title": "ApiManagementCreateProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json new file mode 100644 index 0000000000..e8dc43725d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "deleteSubscriptions": true, + "productId": "testproduct", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Product_Delete", + "title": "ApiManagementDeleteProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json new file mode 100644 index 0000000000..b1b8305960 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Get.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "unlimited", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "unlimited", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Unlimited", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + } + }, + "operationId": "Product_Get", + "title": "ApiManagementGetProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json new file mode 100644 index 0000000000..a747c0747a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "productId": "unlimited", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Product_GetEntityTag", + "title": "ApiManagementHeadProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json new file mode 100644 index 0000000000..066f214387 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByService.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "kjoshiarmtemplateCert1", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/kjoshiarmtemplateCert1", + "properties": { + "description": "Development Product", + "displayName": "Dev", + "state": "published", + "subscriptionRequired": false + } + }, + { + "name": "starter", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/starter", + "properties": { + "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.", + "approvalRequired": false, + "displayName": "Starter", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1, + "terms": "" + } + }, + { + "name": "unlimited", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/unlimited", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Unlimited", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + ] + } + } + }, + "operationId": "Product_ListByService", + "title": "ApiManagementListProducts" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json new file mode 100644 index 0000000000..69fcea931c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_ListByTags.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "value": [ + { + "product": { + "name": "Starter", + "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.", + "approvalRequired": false, + "id": "/products/starter", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1, + "terms": "" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "Product_ListByTags", + "title": "ApiManagementListProductsByTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json new file mode 100644 index 0000000000..88350ea7ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Product_Update.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "Test Template ProductName 4" + } + }, + "productId": "testproduct", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testproduct", + "type": "Microsoft.ApiManagement/service/products", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/testproduct", + "properties": { + "description": "Subscribers have completely unlimited access to the API. Administrator approval is required.", + "approvalRequired": true, + "displayName": "Test Template ProductName 4", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1 + } + } + } + }, + "operationId": "Product_Update", + "title": "ApiManagementUpdateProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json new file mode 100644 index 0000000000..90ea94a68a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByCounterKeys_ListByService.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "quotaCounterKey": "ba", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "counterKey": "ba", + "periodEndTime": "2018-02-08T16:54:40Z", + "periodKey": "0_P3Y6M4DT12H30M5S", + "periodStartTime": "2014-08-04T04:24:35Z", + "value": { + "callsCount": 5, + "kbTransferred": 2.5830078125 + } + } + ] + } + } + }, + "operationId": "QuotaByCounterKeys_ListByService", + "title": "ApiManagementGetQuotaCounterKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json new file mode 100644 index 0000000000..29332f56b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/QuotaByPeriodKeys_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "quotaCounterKey": "ba", + "quotaPeriodKey": "0_P3Y6M4DT12H30M5S", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "counterKey": "ba", + "periodEndTime": "2018-02-08T16:54:40Z", + "periodKey": "0_P3Y6M4DT12H30M5S", + "periodStartTime": "2014-08-04T04:24:35Z", + "value": { + "callsCount": 0, + "kbTransferred": 2.5625 + } + } + } + }, + "operationId": "QuotaByPeriodKeys_Get", + "title": "ApiManagementGetQuotaCounterKeysByQuotaPeriod" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json new file mode 100644 index 0000000000..6511816c5f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Region_ListByService.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "West US", + "isDeleted": false, + "isMasterRegion": true + } + ] + } + } + }, + "operationId": "Region_ListByService", + "title": "ApiManagementListRegions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json new file mode 100644 index 0000000000..bb34763666 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByApi.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "Echo API", + "apiId": "/apis/5600b59475ff190048040001", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + }, + { + "name": "httpbin", + "apiId": "/apis/57a03a13e4bbd5119c8b19e9", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24 + } + ] + } + } + }, + "operationId": "Reports_ListByApi", + "title": "ApiManagementGetReportsByApi" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json new file mode 100644 index 0000000000..84d56594d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByGeo.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "country": "US", + "region": "WA", + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24, + "zip": "98052" + } + ] + } + } + }, + "operationId": "Reports_ListByGeo", + "title": "ApiManagementGetReportsByGeo" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json new file mode 100644 index 0000000000..b34169b1d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByOperation.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "get", + "operationId": "/apis/57a03a13e4bbd5119c8b19e9/operations/57a03a1dd8d14f0a780d7d14", + "apiId": "/apis/57a03a13e4bbd5119c8b19e9", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24 + }, + { + "name": "GetWeatherInformation", + "operationId": "/apis/57c999d1e4bbd50c988cb2c3/operations/57c999d1e4bbd50df889c93e", + "apiId": "/apis/57c999d1e4bbd50c988cb2c3", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + }, + { + "name": "GetCityForecastByZIP", + "operationId": "/apis/57c999d1e4bbd50c988cb2c3/operations/57c999d1e4bbd50df889c93f", + "apiId": "/apis/57c999d1e4bbd50c988cb2c3", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + } + ] + } + } + }, + "operationId": "Reports_ListByOperation", + "title": "ApiManagementGetReportsByOperation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json new file mode 100644 index 0000000000..1c0ef57fb6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByProduct.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "name": "Starter", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "productId": "/products/5600b59475ff190048060001", + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0 + }, + { + "name": "Unlimited", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "productId": "/products/5600b59475ff190048060002", + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24 + } + ] + } + } + }, + "operationId": "Reports_ListByProduct", + "title": "ApiManagementGetReportsByProduct" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json new file mode 100644 index 0000000000..25ced5b441 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByRequest.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "value": [ + { + "operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-", + "method": "GET", + "apiId": "/apis/5931a75ae4bbd512a88c680b", + "apiRegion": "East Asia", + "apiTime": 221.1544, + "cache": "none", + "ipAddress": "207.xx.155.xx", + "productId": "/products/-", + "requestId": "63e7119c-26aa-433c-96d7-f6f3267ff52f", + "requestSize": 0, + "responseCode": 404, + "responseSize": 405, + "serviceTime": 0, + "subscriptionId": "/subscriptions/5600b59475ff190048070002", + "timestamp": "2017-06-03T00:17:00.1649134Z", + "url": "https://apimService1.azure-api.net/echo/resource?param1=sample", + "userId": "/users/1" + }, + { + "operationId": "/apis/5931a75ae4bbd512a88c680b/operations/-", + "method": "POST", + "apiId": "/apis/5931a75ae4bbd512a88c680b", + "apiRegion": "East Asia", + "apiTime": 6.675400000000001, + "cache": "none", + "ipAddress": "207.xx.155.xx", + "productId": "/products/-", + "requestId": "e581b7f7-c9ec-4fc6-8ab9-3855d9b00b04", + "requestSize": 0, + "responseCode": 404, + "responseSize": 403, + "serviceTime": 0, + "subscriptionId": "/subscriptions/5600b59475ff190048070002", + "timestamp": "2017-06-03T00:17:20.5255131Z", + "url": "https://apimService1.azure-api.net/echo/resource", + "userId": "/users/1" + } + ] + } + } + }, + "operationId": "Reports_ListByRequest", + "title": "ApiManagementGetReportsByRequest" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json new file mode 100644 index 0000000000..7d4e4b1608 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListBySubscription.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "productId": "/products/5600b59475ff190048060001", + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "subscriptionId": "/subscriptions/5600b59475ff190048070001", + "userId": "/users/1" + }, + { + "name": "", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "productId": "/products/5600b59475ff190048060002", + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24, + "subscriptionId": "/subscriptions/5600b59475ff190048070002", + "userId": "/users/1" + }, + { + "name": "", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "productId": "/products/5702e97e5157a50f48dce801", + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "subscriptionId": "/subscriptions/5702e97e5157a50a9c733303", + "userId": "/users/1" + } + ] + } + } + }, + "operationId": "Reports_ListBySubscription", + "title": "ApiManagementGetReportsBySubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json new file mode 100644 index 0000000000..4589e1ca8b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByTime.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "interval": "PT15M", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 2, + "nextLink": "", + "value": [ + { + "apiTimeAvg": 1337.46335, + "apiTimeMax": 1819.2173, + "apiTimeMin": 885.0839000000001, + "bandwidth": 3243, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 4, + "callCountTotal": 4, + "interval": "PT15M", + "serviceTimeAvg": 1255.917425, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 882.8264, + "timestamp": "2017-06-03T00:15:00Z" + }, + { + "apiTimeAvg": 872.7818777777778, + "apiTimeMax": 1093.8407, + "apiTimeMin": 330.3206, + "bandwidth": 7776, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 9, + "callCountTotal": 10, + "interval": "PT15M", + "serviceTimeAvg": 824.2847111111112, + "serviceTimeMax": 973.2262000000001, + "serviceTimeMin": 215.24, + "timestamp": "2017-06-03T00:30:00Z" + } + ] + } + } + }, + "operationId": "Reports_ListByTime", + "title": "ApiManagementGetReportsByTime" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json new file mode 100644 index 0000000000..aa7d44128f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Reports_ListByUser.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "$filter": "timestamp ge datetime'2017-06-01T00:00:00' and timestamp le datetime'2017-06-04T00:00:00'", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "Administrator", + "apiTimeAvg": 1015.7607923076923, + "apiTimeMax": 1819.2173, + "apiTimeMin": 330.3206, + "bandwidth": 11019, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 1, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 13, + "callCountTotal": 14, + "serviceTimeAvg": 957.094776923077, + "serviceTimeMax": 1697.3612, + "serviceTimeMin": 215.24, + "userId": "/users/1" + }, + { + "name": "Samir Solanki", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "userId": "/users/56eaec62baf08b06e46d27fd" + }, + { + "name": "Anonymous", + "apiTimeAvg": 0, + "apiTimeMax": 0, + "apiTimeMin": 0, + "bandwidth": 0, + "cacheHitCount": 0, + "cacheMissCount": 0, + "callCountBlocked": 0, + "callCountFailed": 0, + "callCountOther": 0, + "callCountSuccess": 0, + "callCountTotal": 0, + "serviceTimeAvg": 0, + "serviceTimeMax": 0, + "serviceTimeMin": 0, + "userId": "/users/54c800b332965a0035030000" + } + ] + } + } + }, + "operationId": "Reports_ListByUser", + "title": "ApiManagementGetReportsByUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json new file mode 100644 index 0000000000..66bc8616c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_CreateOrUpdate.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "signin", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "SignInSettings_CreateOrUpdate", + "title": "ApiManagementPortalSettingsUpdateSignIn" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json new file mode 100644 index 0000000000..3da6456410 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Get.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "signin", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signin", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "SignInSettings_Get", + "title": "ApiManagementPortalSettingsGetSignIn" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json new file mode 100644 index 0000000000..95686f7ab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_GetEntityTag.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "SignInSettings_GetEntityTag", + "title": "ApiManagementHeadSignInSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json new file mode 100644 index 0000000000..77faa7bebb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignInSettings_Update.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "204": {} + }, + "operationId": "SignInSettings_Update", + "title": "ApiManagementPortalSettingsUpdateSignIn" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json new file mode 100644 index 0000000000..118ca18e3d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_CreateOrUpdate.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "signup", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup", + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + } + } + }, + "operationId": "SignUpSettings_CreateOrUpdate", + "title": "ApiManagementPortalSettingsUpdateSignUp" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json new file mode 100644 index 0000000000..d88584b1a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "signup", + "type": "Microsoft.ApiManagement/service/portalsettings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/portalsettings/signup", + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + } + } + }, + "operationId": "SignUpSettings_Get", + "title": "ApiManagementPortalSettingsGetSignUp" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json new file mode 100644 index 0000000000..2ec8a4d036 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_GetEntityTag.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "SignUpSettings_GetEntityTag", + "title": "ApiManagementHeadSignUpSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json new file mode 100644 index 0000000000..1f3605632e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/SignUpSettings_Update.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true, + "termsOfService": { + "consentRequired": true, + "enabled": true, + "text": "Terms of service text." + } + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "204": {} + }, + "operationId": "SignUpSettings_Update", + "title": "ApiManagementPortalSettingsUpdateSignUp" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json new file mode 100644 index 0000000000..d0ad103deb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_CreateOrUpdate.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testsub", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub", + "properties": { + "createdDate": "2017-06-02T23:34:03.1055076Z", + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + }, + "201": { + "body": { + "name": "testsub", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub", + "properties": { + "createdDate": "2017-06-02T23:34:03.1055076Z", + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57127d485157a511ace86ae7", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + } + }, + "operationId": "Subscription_CreateOrUpdate", + "title": "ApiManagementCreateSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json new file mode 100644 index 0000000000..d696315d38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Subscription_Delete", + "title": "ApiManagementDeleteSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json new file mode 100644 index 0000000000..8ec97bbd2a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "5931a769d8d14f0ad8ce13b8", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "5931a769d8d14f0ad8ce13b8", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8", + "properties": { + "createdDate": "2017-06-02T17:59:06.223Z", + "displayName": "Unlimited", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + } + }, + "operationId": "Subscription_Get", + "title": "ApiManagementGetSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json new file mode 100644 index 0000000000..332bd8db86 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "5931a769d8d14f0ad8ce13b8", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "Subscription_GetEntityTag", + "title": "ApiManagementHeadSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json new file mode 100644 index 0000000000..17fe9e3d76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_List.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "5600b59475ff190048070001", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5600b59475ff190048070001", + "properties": { + "createdDate": "2015-09-22T01:57:40.3Z", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001", + "state": "active" + } + }, + { + "name": "56eaed3dbaf08b06e46d27fe", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/56eaed3dbaf08b06e46d27fe", + "properties": { + "createdDate": "2016-03-17T17:45:33.837Z", + "displayName": "Starter", + "expirationDate": "2016-04-01T00:00:00Z", + "notificationDate": "2016-03-20T00:00:00Z", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060001", + "startDate": "2016-03-17T00:00:00Z", + "state": "active" + } + }, + { + "name": "5931a769d8d14f0ad8ce13b8", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/5931a769d8d14f0ad8ce13b8", + "properties": { + "createdDate": "2017-06-02T17:59:06.223Z", + "displayName": "Unlimited", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + ] + } + } + }, + "operationId": "Subscription_List", + "title": "ApiManagementListSubscriptions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json new file mode 100644 index 0000000000..665c9d370e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_ListSecrets.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "5931a769d8d14f0ad8ce13b8", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "primaryKey": "", + "secondaryKey": "" + } + } + }, + "operationId": "Subscription_ListSecrets", + "title": "ApiManagementSubscriptionListSecrets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json new file mode 100644 index 0000000000..ffeff54e1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegeneratePrimaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "Subscription_RegeneratePrimaryKey", + "title": "ApiManagementSubscriptionRegeneratePrimaryKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json new file mode 100644 index 0000000000..ce01f4f16c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_RegenerateSecondaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "Subscription_RegenerateSecondaryKey", + "title": "ApiManagementSubscriptionRegenerateSecondaryKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json new file mode 100644 index 0000000000..f7934340cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Subscription_Update.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "displayName": "testsub" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "sid": "testsub", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "testsub", + "type": "Microsoft.ApiManagement/service/subscriptions", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/subscriptions/testsub", + "properties": { + "createdDate": "2017-06-02T17:59:06.223Z", + "displayName": "testsub", + "ownerId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "scope": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/products/5600b59475ff190048060002", + "state": "submitted" + } + } + } + }, + "operationId": "Subscription_Update", + "title": "ApiManagementUpdateSubscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json new file mode 100644 index 0000000000..8352698bae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TagResource_ListByService.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "operation": { + "name": "Create resource", + "method": "POST", + "description": "A demonstration of a POST call based on the echo backend above. The request body is expected to contain JSON-formatted data (see example below). A policy is used to automatically transform any request sent in JSON directly to XML. In a real-world scenario this could be used to enable modern clients to speak to a legacy backend.", + "apiName": "Echo API", + "apiRevision": "1", + "id": "/apis/echo-api/operations/create-resource", + "urlTemplate": "/resource" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + }, + { + "api": { + "name": "Echo API", + "path": "echo", + "apiRevision": "1", + "id": "/apis/echo-api", + "isCurrent": true, + "serviceUrl": "http://echoapi.cloudapp.net/api" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + }, + { + "product": { + "name": "Starter", + "description": "Subscribers will be able to run 5 calls/minute up to a maximum of 100 calls/week.", + "approvalRequired": false, + "id": "/products/starter", + "state": "published", + "subscriptionRequired": true, + "subscriptionsLimit": 1, + "terms": "" + }, + "tag": { + "name": "awesomeTag", + "id": "/tags/apitag123" + } + } + ] + } + } + }, + "operationId": "TagResource_ListByService", + "title": "ApiManagementListTagResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json new file mode 100644 index 0000000000..06c422750e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_AssignToOperation.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "operationId": "5931a75ae4bbd512a88c680a", + "api-version": "2021-08-01", + "apiId": "5931a75ae4bbd512a88c680b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "tagId1" + }, + "responses": { + "200": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1", + "properties": { + "displayName": "tag1" + } + } + }, + "201": { + "body": { + "name": "tagId1", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/tagId1", + "properties": { + "displayName": "tag1" + } + } + } + }, + "operationId": "Tag_AssignToOperation", + "title": "ApiManagementCreateApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json new file mode 100644 index 0000000000..44a59a20b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_DetachFromOperation.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "operationId": "59d5b28d1f7fab116c282651", + "If-Match": "*", + "api-version": "2021-08-01", + "apiId": "59d5b28d1f7fab116c282650", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "59d5b28e1f7fab116402044e" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Tag_DetachFromOperation", + "title": "ApiManagementDeleteApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json new file mode 100644 index 0000000000..a04ff58519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetByOperation.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "operationId": "59d6bb8f1f7fab13dc67ec9a", + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "body": { + "name": "59306a29e4bbd510dc24e5f9", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/59306a29e4bbd510dc24e5f9", + "properties": { + "displayName": "tag1" + } + } + } + }, + "operationId": "Tag_GetByOperation", + "title": "ApiManagementGetApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json new file mode 100644 index 0000000000..a2160d7f35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_GetEntityStateByOperation.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "operationId": "59d6bb8f1f7fab13dc67ec9a", + "api-version": "2021-08-01", + "apiId": "59d6bb8f1f7fab13dc67ec9b", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "tagId": "59306a29e4bbd510dc24e5f9" + }, + "responses": { + "200": { + "headers": { + "Etag": "AAAAAAAACCI=" + } + } + }, + "operationId": "Tag_GetEntityStateByOperation", + "title": "ApiManagementHeadApiOperationTag" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json new file mode 100644 index 0000000000..790a34b4da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/Tag_ListByOperation.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "operationId": "57d2ef278aa04f0888cba3f6", + "api-version": "2021-08-01", + "apiId": "57d2ef278aa04f0888cba3f3", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b539c53f5b0062060002", + "type": "Microsoft.ApiManagement/service/tags", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tags/5600b539c53f5b0062060002", + "properties": { + "displayName": "tag1" + } + } + ] + } + } + }, + "operationId": "Tag_ListByOperation", + "title": "ApiManagementListApiOperationTags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json new file mode 100644 index 0000000000..51ea9475c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegeneratePrimaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccessGit_RegeneratePrimaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json new file mode 100644 index 0000000000..fbf689bae4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccessGit_RegenerateSecondaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccessGit_RegenerateSecondaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json new file mode 100644 index 0000000000..51d288c325 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Create.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "If-Match": "*", + "accessName": "access", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "TenantAccess_Create", + "title": "ApiManagementCreateTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json new file mode 100644 index 0000000000..cb9b8142a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_GetEntityTag.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": {} + }, + "operationId": "TenantAccess_GetEntityTag", + "title": "ApiManagementHeadTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json new file mode 100644 index 0000000000..14aa826000 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantAccess.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "TenantAccess_Get", + "title": "ApiManagementGetTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json new file mode 100644 index 0000000000..93d51c94b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Get_ApiManagementGetTenantGitAccess.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accessName": "gitAccess", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "gitAccess", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/gitAccess", + "properties": { + "enabled": true, + "principalId": "git" + } + } + } + }, + "operationId": "TenantAccess_Get", + "title": "ApiManagementGetTenantGitAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json new file mode 100644 index 0000000000..92cd46984f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListByService.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + ] + } + } + }, + "operationId": "TenantAccess_ListByService", + "title": "ApiManagementListTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json new file mode 100644 index 0000000000..20227cec6b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_ListSecrets.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "enabled": true, + "id": "5600b59375ff190048030003", + "primaryKey": "", + "secondaryKey": "" + } + } + }, + "operationId": "TenantAccess_ListSecrets", + "title": "ApiManagementListSecretsTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json new file mode 100644 index 0000000000..fe4ba4bb0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegeneratePrimaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccess_RegeneratePrimaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json new file mode 100644 index 0000000000..ecb23922a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_RegenerateSecondaryKey.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "accessName": "access", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "204": {} + }, + "operationId": "TenantAccess_RegenerateSecondaryKey", + "title": "ApiManagementTenantAccessRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json new file mode 100644 index 0000000000..3488df2d32 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantAccess_Update.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "If-Match": "*", + "accessName": "access", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "enabled": true + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "access", + "type": "Microsoft.ApiManagement/service/tenant", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/access", + "properties": { + "enabled": true + } + } + } + }, + "operationId": "TenantAccess_Update", + "title": "ApiManagementUpdateTenantAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json new file mode 100644 index 0000000000..46187d8a53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Deploy.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "parameters": { + "properties": { + "branch": "master" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "6074e652093a9d0dac3d733c", + "type": "Microsoft.ApiManagement/service/tenant/operationResults", + "id": "6074e652093a9d0dac3d733c", + "properties": { + "error": { + "code": "ValidationError", + "message": "File not found: 'api-management/configuration.json'" + }, + "started": "2017-11-26T17:06:54.303Z", + "status": "Failed", + "updated": "2017-11-26T17:07:21.777Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af4ae2a6d2e0b688d7517?api-version=2021-08-01" + } + } + }, + "operationId": "TenantConfiguration_Deploy", + "title": "ApiManagementTenantConfigurationDeploy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json new file mode 100644 index 0000000000..fbe3fa05dc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_GetSyncState.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "syncState", + "type": "Microsoft.ApiManagement/service/tenant/syncState", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/syncState", + "properties": { + "branch": "master", + "commitId": "de891c2342c7058dde45e5e624eae7e558c94683", + "configurationChangeDate": "2021-04-13T00:11:43.862781Z", + "isExport": true, + "isGitEnabled": true, + "isSynced": true, + "lastOperationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/configuration/operationResults/6074f0bd093a9d0dac3d7347", + "syncDate": "2021-04-13T01:15:53.9824995Z" + } + } + } + }, + "operationId": "TenantConfiguration_GetSyncState", + "title": "ApiManagementTenantAccessSyncState" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json new file mode 100644 index 0000000000..106872d847 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Save.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "parameters": { + "properties": { + "branch": "master" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "6074e652093a9d0dac3d733c", + "type": "Microsoft.ApiManagement/service/tenant/operationResults", + "id": "6074e652093a9d0dac3d733c", + "properties": { + "actionLog": [], + "resultInfo": "The configuration was successfully saved to master as commit c0ae274f6046912107bad734834cbf65918668b6.", + "started": "2021-04-13T00:31:14.94Z", + "status": "Succeeded", + "updated": "2021-04-13T00:31:27.59Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af57d2a6d2e0b688d751b?api-version=2021-08-01" + } + } + }, + "operationId": "TenantConfiguration_Save", + "title": "ApiManagementTenantConfigurationSave" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json new file mode 100644 index 0000000000..a2ff141df4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantConfiguration_Validate.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "configurationName": "configuration", + "parameters": { + "properties": { + "branch": "master" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "6074ec02093a9d0dac3d7345", + "type": "Microsoft.ApiManagement/service/tenant/operationResults", + "id": "6074ec02093a9d0dac3d7345", + "properties": { + "actionLog": [], + "resultInfo": "Validation is successfull", + "started": "2021-04-13T00:55:30.62Z", + "status": "Succeeded", + "updated": "2021-04-13T00:55:39.857Z" + } + } + }, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/tenant/operationResults/5a1af64e2a6d2e0b688d751e?api-version=2021-08-01" + } + } + }, + "operationId": "TenantConfiguration_Validate", + "title": "ApiManagementTenantConfigurationValidate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json new file mode 100644 index 0000000000..a9133f4bc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "settingsType": "public", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "public", + "type": "Microsoft.ApiManagement/service/settings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public", + "properties": { + "settings": { + "CustomPortalSettings.DelegatedSubscriptionEnabled": "False", + "CustomPortalSettings.DelegationEnabled": "False", + "CustomPortalSettings.DelegationUrl": "", + "CustomPortalSettings.UserRegistrationTerms": null, + "CustomPortalSettings.UserRegistrationTermsConsentRequired": "False", + "CustomPortalSettings.UserRegistrationTermsEnabled": "False" + } + } + } + } + }, + "operationId": "TenantSettings_Get", + "title": "ApiManagementGetTenantSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json new file mode 100644 index 0000000000..e3d388d9e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/TenantSettings_ListByService.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "name": "public", + "type": "Microsoft.ApiManagement/service/settings", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/settings/public", + "properties": { + "settings": { + "CustomPortalSettings.DelegatedSubscriptionEnabled": "False", + "CustomPortalSettings.DelegationEnabled": "False", + "CustomPortalSettings.DelegationUrl": "", + "CustomPortalSettings.UserRegistrationTerms": null, + "CustomPortalSettings.UserRegistrationTermsConsentRequired": "False", + "CustomPortalSettings.UserRegistrationTermsEnabled": "False" + } + } + } + ] + } + } + }, + "operationId": "TenantSettings_ListByService", + "title": "ApiManagementListTenantSettings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json new file mode 100644 index 0000000000..a3d5b9824f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserConfirmationPassword_Send.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57127d485157a511ace86ae7" + }, + "responses": { + "204": {} + }, + "operationId": "UserConfirmationPassword_Send", + "title": "ApiManagementUserConfirmationPasswordSend" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json new file mode 100644 index 0000000000..99f0641dc8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserGroup_List.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57681833a40f7eb6c49f6acf" + }, + "responses": { + "200": { + "body": { + "count": 1, + "nextLink": "", + "value": [ + { + "name": "5600b57e7e8880006a020002", + "type": "Microsoft.ApiManagement/service/users/groups", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/57681833a40f7eb6c49f6acf/groups/5600b57e7e8880006a020002", + "properties": { + "type": "system", + "description": "Developers is a built-in group. Its membership is managed by the system. Signed-in users fall into this group.", + "builtIn": true, + "displayName": "Developers" + } + } + ] + } + } + }, + "operationId": "UserGroup_List", + "title": "ApiManagementListUserGroups" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json new file mode 100644 index 0000000000..00f39f1996 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/UserIdentities_List.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57f2af53bb17172280f44057" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "id": "086cf9********55ab", + "provider": "Microsoft" + } + ] + } + } + }, + "operationId": "UserIdentities_List", + "title": "ApiManagementListUserIdentities" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json new file mode 100644 index 0000000000..2afaebba34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_CreateOrUpdate.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "confirmation": "signup", + "email": "foobar@outlook.com", + "firstName": "foo", + "lastName": "bar" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": { + "body": { + "name": "5931a75ae4bbd512288c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "groups": [], + "identities": [ + { + "id": "foobar@outlook.com", + "provider": "Basic" + } + ], + "lastName": "bar", + "registrationDate": "2018-01-07T21:21:29.16Z", + "state": "active" + } + } + }, + "201": { + "body": { + "name": "5931a75ae4bbd512288c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512288c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "groups": [], + "identities": [ + { + "id": "foobar@outlook.com", + "provider": "Basic" + } + ], + "lastName": "bar", + "registrationDate": "2018-01-07T21:21:29.16Z", + "state": "active" + } + } + } + }, + "operationId": "User_CreateOrUpdate", + "title": "ApiManagementCreateUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json new file mode 100644 index 0000000000..1ef7cf5441 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512288c680b" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "User_Delete", + "title": "ApiManagementDeleteUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json new file mode 100644 index 0000000000..c641d92da5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GenerateSsoUrl.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "57127d485157a511ace86ae7" + }, + "responses": { + "200": { + "body": { + "value": "https://apimService1.portal.azure-api.net/signin-sso?token=57127d485157a511ace86ae7%26201706051624%267VY18MlwAom***********2bYr2bDQHg21OzQsNakExQ%3d%3d" + } + } + }, + "operationId": "User_GenerateSsoUrl", + "title": "ApiManagementUserGenerateSsoUrl" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json new file mode 100644 index 0000000000..8a4e8c0f37 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Get.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512a88c680b" + }, + "responses": { + "200": { + "body": { + "name": "5931a75ae4bbd512a88c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "identities": [ + { + "id": "*************", + "provider": "Microsoft" + } + ], + "lastName": "bar", + "registrationDate": "2017-06-02T17:58:50.357Z", + "state": "active" + } + } + } + }, + "operationId": "User_Get", + "title": "ApiManagementGetUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json new file mode 100644 index 0000000000..f9b9c0229a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetEntityTag.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512a88c680b" + }, + "responses": { + "200": { + "headers": { + "etag": "AAAAAAAAAAa=" + } + } + }, + "operationId": "User_GetEntityTag", + "title": "ApiManagementHeadUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json new file mode 100644 index 0000000000..7d855c619b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_GetSharedAccessToken.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "parameters": { + "properties": { + "expiry": "2019-04-21T00:44:24.2845269Z", + "keyType": "primary" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "userId1718" + }, + "responses": { + "200": { + "body": { + "value": "userId1718&201904210044&9A1GR1f5WIhFvFmzQG+xxxxxxxxxxx/kBeu87DWad3tkasUXuvPL+MgzlwUHyg==" + } + } + }, + "operationId": "User_GetSharedAccessToken", + "title": "ApiManagementUserToken" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json new file mode 100644 index 0000000000..c773b87887 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_ListByService.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2021-08-01", + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "count": 3, + "nextLink": "", + "value": [ + { + "name": "1", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/1", + "properties": { + "email": "admin@live.com", + "firstName": "Administrator", + "identities": [ + { + "id": "admin@live.com", + "provider": "Azure" + } + ], + "lastName": "", + "registrationDate": "2015-09-22T01:57:39.677Z", + "state": "active" + } + }, + { + "name": "56eaec62baf08b06e46d27fd", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/56eaec62baf08b06e46d27fd", + "properties": { + "email": "foo.bar.83@gmail.com", + "firstName": "foo", + "identities": [ + { + "id": "foo.bar.83@gmail.com", + "provider": "Basic" + } + ], + "lastName": "bar", + "registrationDate": "2016-03-17T17:41:56.327Z", + "state": "active" + } + }, + { + "name": "5931a75ae4bbd512a88c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "identities": [ + { + "id": "*************", + "provider": "Microsoft" + } + ], + "lastName": "bar", + "registrationDate": "2017-06-02T17:58:50.357Z", + "state": "active" + } + } + ] + } + } + }, + "operationId": "User_ListByService", + "title": "ApiManagementListUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json new file mode 100644 index 0000000000..b3572419ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/examples/2021-08-01/User_Update.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "If-Match": "*", + "api-version": "2021-08-01", + "parameters": { + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "lastName": "bar" + } + }, + "resourceGroupName": "rg1", + "serviceName": "apimService1", + "subscriptionId": "subid", + "userId": "5931a75ae4bbd512a88c680b" + }, + "responses": { + "200": { + "body": { + "name": "5931a75ae4bbd512a88c680b", + "type": "Microsoft.ApiManagement/service/users", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/users/5931a75ae4bbd512a88c680b", + "properties": { + "email": "foobar@outlook.com", + "firstName": "foo", + "identities": [ + { + "id": "*************", + "provider": "Microsoft" + } + ], + "lastName": "bar", + "registrationDate": "2017-06-02T17:58:50.357Z", + "state": "active" + } + } + } + }, + "operationId": "User_Update", + "title": "ApiManagementUpdateUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp index 37b1750145..0ad30a6d44 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/main.tsp @@ -65,7 +65,8 @@ using TypeSpec.Versioning; title: "ApiManagementClient", }) @versioned(Versions) -@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +// FIXME: Common type version v2 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) @doc("ApiManagement Client") namespace Azure.ResourceManager.ApiManagement; @@ -73,5 +74,6 @@ namespace Azure.ResourceManager.ApiManagement; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2021-08-01 API version.") v2021_08_01: "2021-08-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp index 9af6ebe1e5..b8831fee82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/models.tsp @@ -7,6 +7,7 @@ using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Azure.ResourceManager.ApiManagement; @@ -19,6 +20,7 @@ enum Protocol { wss, } +@doc("An value that determines where the API Version identifier will be located in a HTTP request.") enum VersioningScheme { Segment, Query, @@ -30,6 +32,7 @@ enum BearerTokenSendingMethod { query, } +@doc("Type of API.") enum ApiType { http, soap, @@ -37,6 +40,7 @@ enum ApiType { graphql, } +@doc("Format of the Content in which the API is getting imported.") enum ContentFormat { @doc("The contents are inline and Content type is a WADL document.") `wadl-xml`, @@ -62,6 +66,13 @@ enum ContentFormat { `graphql-link`, } +@doc(""" +Type of API to create. + * `http` creates a REST API + * `soap` creates a SOAP pass-through API + * `websocket` creates websocket API + * `graphql` creates GraphQL API. +""") enum SoapApiType { @doc("Imports a SOAP API having a RESTful front end.") SoapToRest: "http", @doc("Imports the SOAP API having a SOAP front end.") SoapPassThrough: "soap", @@ -69,6 +80,7 @@ enum SoapApiType { @doc("Imports the API having a GraphQL front end.") GraphQL: "graphql", } +@doc("Format of the policyContent.") enum PolicyContentFormat { @doc("The contents are inline and Content type is an XML document.") xml, @doc("The policy XML document is hosted on a http endpoint accessible from the API Management service.") @@ -89,20 +101,24 @@ enum PolicyExportFormat { rawxml, } +@doc("Specifies for what type of messages sampling settings should not apply.") enum AlwaysLog { @doc("Always log all erroneous request regardless of sampling settings.") allErrors, } +@doc("Sampling type.") enum SamplingType { @doc("Fixed-rate sampling.") fixed, } +@doc("Data masking mode.") enum DataMaskingMode { @doc("Mask the value of an entity.") Mask, @doc("Hide the presence of an entity.") Hide, } +@doc("Sets correlation protocol to use for Application Insights diagnostics.") enum HttpCorrelationProtocol { @doc("Do not read and inject correlation headers.") None, @doc("Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md.") @@ -111,6 +127,7 @@ enum HttpCorrelationProtocol { W3C, } +@doc("The verbosity level applied to traces emitted by trace policies.") enum Verbosity { @doc("All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance.") verbose, @@ -120,11 +137,13 @@ enum Verbosity { error, } +@doc("The format of the Operation Name for Application Insights telemetries. Default is Name.") enum OperationNameFormat { @doc("API_NAME;rev=API_REVISION - OPERATION_NAME") Name, @doc("HTTP_VERB URL") Url, } +@doc("Status of the issue.") enum State { @doc("The issue is proposed.") proposed, @doc("The issue is opened.") open, @@ -150,6 +169,7 @@ enum ExportApi { `true`, } +@doc("Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes.") enum ExportResultFormat { @doc("The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob.") Swagger: "swagger-link-json", @@ -177,37 +197,44 @@ enum ClientAuthenticationMethod { @doc("Body based Authentication method.") Body, } +@doc("Backend communication protocol.") enum BackendProtocol { @doc("The Backend is a RESTful service.") http, @doc("The Backend is a SOAP service.") soap, } +@doc("The IP version to be used. Only IPv4 is supported for now.") enum PreferredIPVersion { IPv4, } +@doc("The request's protocol. Specific protocol configuration can be available based on this selection. The specified destination address must be coherent with this value.") enum ConnectivityCheckProtocol { TCP, HTTP, HTTPS, } +@doc("The HTTP method to be used.") enum Method { GET, POST, } +@doc("The origin of the issue.") enum Origin { Local, Inbound, Outbound, } +@doc("The severity of the issue.") enum Severity { Error, Warning, } +@doc("The type of issue.") enum IssueType { Unknown, AgentStopped, @@ -220,6 +247,7 @@ enum IssueType { Platform, } +@doc("The connection status.") enum ConnectionStatus { Unknown, Connected, @@ -227,6 +255,7 @@ enum ConnectionStatus { Degraded, } +@doc("Name of the Sku.") enum SkuType { @doc("Developer SKU of Api Management.") Developer, @doc("Standard SKU of Api Management.") Standard, @@ -236,18 +265,21 @@ enum SkuType { @doc("Isolated SKU of Api Management.") Isolated, } +@doc("The scale type applicable to the sku.") enum ResourceSkuCapacityScaleType { @doc("Supported scale type automatic.") automatic, @doc("Supported scale type manual.") manual, @doc("Scaling not supported.") none, } +@doc("The type of access to be used for the storage account.") enum AccessType { @doc("Use access key.") AccessKey, @doc("Use system assigned managed identity.") SystemAssignedManagedIdentity, @doc("Use user assigned managed identity.") UserAssignedManagedIdentity, } +@doc("Hostname type.") enum HostnameType { Proxy, Portal, @@ -256,6 +288,7 @@ enum HostnameType { DeveloperPortal, } +@doc("Certificate Source.") enum CertificateSource { Managed, KeyVault, @@ -263,17 +296,20 @@ enum CertificateSource { BuiltIn, } +@doc("Certificate Status.") enum CertificateStatus { Completed, Failed, InProgress, } +@doc("Whether or not public endpoint access is allowed for this API Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'") enum PublicNetworkAccess { Enabled, Disabled, } +@doc("Compute Platform Version running the service.") enum PlatformVersion { @doc("Platform version cannot be determined, as compute platform is not deployed.") undetermined, @@ -282,11 +318,13 @@ enum PlatformVersion { @doc("Platform running the service on Multi Tenant V1 platform.") mtv1, } +@doc("The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations.") enum CertificateConfigurationStoreName { CertificateAuthority, Root, } +@doc("The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only.") enum VirtualNetworkType { @doc("The service is not part of any Virtual Network.") None, @doc("The service is part of Virtual Network and it is accessible from Internet.") @@ -295,12 +333,14 @@ enum VirtualNetworkType { Internal, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service.") enum ApimIdentityType { SystemAssigned, UserAssigned, @@ -308,6 +348,7 @@ enum ApimIdentityType { None, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -332,6 +373,7 @@ enum TemplateName { requestDeveloperNotificationMessage, } +@doc("Account state. Specifies whether the user is active or not. Blocked users are unable to sign into the developer portal or call any APIs of subscribed products. Default state is Active.") enum UserState { @doc("User state is active.") active, @doc("User is blocked. Blocked users cannot authenticate at developer portal or call API.") @@ -351,12 +393,14 @@ enum IdentityProviderType { @doc("Azure Active Directory B2C as Identity provider.") aadB2C, } +@doc("Logger type.") enum LoggerType { @doc("Azure Event Hub as log destination.") azureEventHub, @doc("Azure Application Insights as log destination.") applicationInsights, @doc("Azure Monitor") azureMonitor, } +@doc("Resource Connectivity Status Type identifier.") enum ConnectivityStatusType { initializing, success, @@ -380,6 +424,7 @@ enum NotificationName { QuotaLimitApproachingPublisherNotificationMessage, } +@doc("Status of the portal's revision.") enum PortalRevisionStatus { @doc("Portal's revision has been queued.") pending, @doc("Portal's revision is being published.") publishing, @@ -387,6 +432,7 @@ enum PortalRevisionStatus { @doc("Portal's revision publishing failed.") failed, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -394,6 +440,7 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("Schema Type. Immutable.") enum SchemaType { @doc("Xml schema type.") Xml: "xml", @doc("Json schema type.") Json: "json", @@ -417,18 +464,22 @@ enum ConfigurationIdName { configuration, } +@doc("Determines the type of confirmation e-mail that will be sent to the newly created user.") enum Confirmation { @doc("Send an e-mail to the user confirming they have successfully signed up.") signup, @doc("Send an e-mail inviting the user to sign-up and complete registration.") invite, } -@Azure.Core.fixed + +@doc("whether product is published or not. Published products are discoverable by users of developer portal. Non published products are visible only to administrators. Default state of Product is notPublished.") +@fixed enum ProductState { notPublished, published, } -@Azure.Core.fixed + +@fixed enum AuthorizationMethod { HEAD, OPTIONS, @@ -439,29 +490,38 @@ enum AuthorizationMethod { PATCH, DELETE, } -@Azure.Core.fixed + +@doc("Invalid indicates the name provided does not match the resource provider’s naming requirements (incorrect length, unsupported characters, etc.) AlreadyExists indicates that the name is already in use and is therefore unavailable.") +@fixed enum NameAvailabilityReason { Valid, Invalid, AlreadyExists, } -@Azure.Core.fixed + +@doc("The Key being regenerated.") +@fixed enum GatewayRegenerateKeyType { primary, secondary, } -@Azure.Core.fixed + +@doc("The Key to be used to generate token for user.") +@fixed enum KeyType { primary, secondary, } -@Azure.Core.fixed + +@doc("Group type.") +@fixed enum GroupType { custom, system, external, } -@Azure.Core.fixed + +@fixed enum PolicyScopeContract { Tenant, Product, @@ -469,7 +529,9 @@ enum PolicyScopeContract { Operation, All, } -@Azure.Core.fixed + +@doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") +@fixed enum SubscriptionState { suspended, active, @@ -478,23 +540,31 @@ enum SubscriptionState { rejected, cancelled, } -@Azure.Core.fixed + +@doc("The scale type applicable to the sku.") +@fixed enum ApiManagementSkuCapacityScaleType { Automatic, Manual, None, } -@Azure.Core.fixed + +@doc("The type of restrictions.") +@fixed enum ApiManagementSkuRestrictionsType { Location, Zone, } -@Azure.Core.fixed + +@doc("The reason for restriction.") +@fixed enum ApiManagementSkuRestrictionsReasonCode { QuotaId, NotAvailableForSubscription, } -@Azure.Core.fixed + +@doc("Status of an async operation.") +@fixed enum AsyncOperationStatus { Started, InProgress, @@ -661,6 +731,21 @@ model ApiLicenseInformation { url?: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; +} + @doc("Error Body contract.") model ErrorResponseBody { @doc("Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.") @@ -722,6 +807,32 @@ model ApiCreateOrUpdatePropertiesWsdlSelector { wsdlEndpointName?: string; } +@doc("API update contract details.") +model ApiUpdateContract { + @doc("Properties of the API entity that can be updated.") + properties?: ApiContractUpdateProperties; +} + +@doc("API update contract properties.") +model ApiContractUpdateProperties extends ApiEntityBaseContract { + @doc("API name.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("Absolute URL of the backend service implementing this API.") + @maxLength(2000) + @minLength(1) + serviceUrl?: string; + + @doc("Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.") + @maxLength(400) + path?: string; + + @doc("Describes on which protocols the operations in this API can be invoked.") + protocols?: Protocol[]; +} + @doc("Paged API Revision list representation.") model ApiRevisionListResult is Azure.Core.Page { @doc("Total record count number across all pages.") @@ -915,6 +1026,28 @@ model ResponseContract { headers?: ParameterContract[]; } +@doc("API Operation Update Contract details.") +model OperationUpdateContract { + @doc("Properties of the API Operation entity that can be updated.") + properties?: OperationUpdateContractProperties; +} + +@doc("Operation Update Contract Properties.") +model OperationUpdateContractProperties extends OperationEntityBaseContract { + @doc("Operation Name.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.") + method?: string; + + @doc("Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}") + @maxLength(1000) + @minLength(1) + urlTemplate?: string; +} + @doc("Policy contract Properties.") model PolicyContractProperties { @doc("Contents of the Policy as defined by the format.") @@ -1097,6 +1230,24 @@ model IssueContractBaseProperties { apiId?: string; } +@doc("Issue update Parameters.") +model IssueUpdateContract { + @doc("Issue entity Update contract properties.") + properties?: IssueUpdateContractProperties; +} + +@doc("Issue contract Update Properties.") +model IssueUpdateContractProperties extends IssueContractBaseProperties { + @doc("The issue title.") + title?: string; + + @doc("Text describing the issue.") + description?: string; + + @doc("A resource identifier for the user created the issue.") + userId?: string; +} + @doc("Issue Comment contract Properties.") model IssueCommentContractProperties { @doc("Comment text.") @@ -1300,6 +1451,23 @@ model ApiVersionSetEntityBase { versionHeaderName?: string; } +@doc("Parameters to update or create an API Version Set Contract.") +model ApiVersionSetUpdateParameters { + @doc("Parameters to update or create an API Version Set Contract.") + properties?: ApiVersionSetUpdateParametersProperties; +} + +@doc("Properties used to create or update an API Version Set.") +model ApiVersionSetUpdateParametersProperties extends ApiVersionSetEntityBase { + @doc("Name of API Version Set") + @maxLength(100) + @minLength(1) + displayName?: string; + + @doc("An value that determines where the API Version identifier will be located in a HTTP request.") + versioningScheme?: VersioningScheme; +} + @doc("External OAuth authorization server settings Properties.") model AuthorizationServerContractProperties extends AuthorizationServerContractBaseProperties { @@ -1368,6 +1536,36 @@ model TokenBodyParameterContract { value: string; } +@doc("External OAuth authorization server settings.") +model AuthorizationServerUpdateContract extends Resource { + @doc("Properties of the External OAuth authorization server update Contract.") + properties?: AuthorizationServerUpdateContractProperties; +} + +@doc("External OAuth authorization server Update settings contract.") +model AuthorizationServerUpdateContractProperties + extends AuthorizationServerContractBaseProperties { + @doc("User-friendly authorization server name.") + @maxLength(50) + @minLength(1) + displayName?: string; + + @doc("Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.") + clientRegistrationEndpoint?: string; + + @doc("OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.") + authorizationEndpoint?: string; + + @doc("Form of an authorization grant, which the client uses to request the access token.") + grantTypes?: GrantType[]; + + @doc("Client or app id registered with this authorization server.") + clientId?: string; + + @doc("Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.") + clientSecret?: string; +} + @doc("OAuth Server Secrets Contract.") model AuthorizationServerSecretsContract { @doc("oAuth Authorization Server Secrets.") @@ -1511,6 +1709,23 @@ model BackendTlsProperties { validateCertificateName?: boolean; } +@doc("Backend update parameters.") +model BackendUpdateParameters { + @doc("Backend entity update contract properties.") + properties?: BackendUpdateParameterProperties; +} + +@doc("Parameters supplied to the Update Backend operation.") +model BackendUpdateParameterProperties extends BackendBaseParameters { + @doc("Runtime Url of the Backend.") + @maxLength(2000) + @minLength(1) + url?: string; + + @doc("Backend communication protocol.") + protocol?: BackendProtocol; +} + @doc("Reconnect request parameters.") model BackendReconnectContract extends Resource { @doc("Reconnect request properties.") @@ -1543,6 +1758,32 @@ model CacheContractProperties { resourceUri?: string; } +@doc("Cache update details.") +model CacheUpdateParameters { + @doc("Cache update properties details.") + properties?: CacheUpdateProperties; +} + +@doc("Parameters supplied to the Update Cache operation.") +model CacheUpdateProperties { + @doc("Cache description") + @maxLength(2000) + description?: string; + + @doc("Runtime connection string to cache") + @maxLength(300) + connectionString?: string; + + @doc("Location identifier to use cache from (should be either 'default' or valid Azure region identifier)") + @maxLength(256) + useFromLocation?: string; + + @doc("Original uri of entity in external system cache points to") + @maxLength(2000) + @projectedName("json", "resourceId") + resourceUri?: string; +} + @doc("Properties of the Certificate contract.") model CertificateContractProperties { @doc("Subject attribute of the certificate.") @@ -2194,6 +2435,37 @@ model ApimResource { tags?: Record; } +@doc("Parameter supplied to Update Api Management Service.") +model ApiManagementServiceUpdateParameters extends ApimResource { + @doc("Properties of the API Management service.") + properties?: ApiManagementServiceUpdateProperties; + + @doc("SKU properties of the API Management service.") + sku?: ApiManagementServiceSkuProperties; + + @doc("Managed service identity of the Api Management service.") + identity?: ApiManagementServiceIdentity; + + @doc("ETag of the resource.") + @visibility("read") + etag?: string; + + @doc("A list of availability zones denoting where the resource needs to come from.") + zones?: string[]; +} + +@doc("Properties of an API Management service resource description.") +model ApiManagementServiceUpdateProperties + extends ApiManagementServiceBaseProperties { + @doc("Publisher email.") + @maxLength(100) + publisherEmail?: string; + + @doc("Publisher name.") + @maxLength(100) + publisherName?: string; +} + @doc("The response of the GetSsoToken operation.") model ApiManagementServiceGetSsoTokenResult { @doc("Redirect URL to the Publisher Portal containing the SSO token.") @@ -2278,6 +2550,33 @@ model EmailTemplateParametersContractProperties { description?: string; } +@doc("Email Template update Parameters.") +model EmailTemplateUpdateParameters { + @doc("Email Template Update contract properties.") + properties?: EmailTemplateUpdateParameterProperties; +} + +@doc("Email Template Update Contract properties.") +model EmailTemplateUpdateParameterProperties { + @doc("Subject of the Template.") + @maxLength(1000) + @minLength(1) + subject?: string; + + @doc("Title of the Template.") + title?: string; + + @doc("Description of the Email Template.") + description?: string; + + @doc("Email Template Body. This should be a valid XDocument") + @minLength(1) + body?: string; + + @doc("Email Template Parameter values.") + parameters?: EmailTemplateParametersContractProperties[]; +} + @doc("Properties of the Gateway contract.") model GatewayContractProperties { @doc("Gateway location.") @@ -2433,6 +2732,29 @@ model GroupCreateParametersProperties { externalId?: string; } +@doc("Parameters supplied to the Update Group operation.") +model GroupUpdateParameters { + @doc("Group entity update contract properties.") + properties?: GroupUpdateParametersProperties; +} + +@doc("Parameters supplied to the Update Group operation.") +model GroupUpdateParametersProperties { + @doc("Group name.") + @maxLength(300) + @minLength(1) + displayName?: string; + + @doc("Group description.") + description?: string; + + @doc("Group type.") + type?: GroupType; + + @doc("Identifier of the external groups, this property contains the id of the group from the external identity provider, e.g. for Azure Active Directory `aad://.onmicrosoft.com/groups/`; otherwise the value is null.") + externalId?: string; +} + @doc("Paged Group Users list representation.") model ApiManagementGroupUserListResult is Azure.Core.Page { @@ -2551,6 +2873,23 @@ model IdentityProviderCreateContractProperties clientSecret: string; } +@doc("Parameters supplied to update Identity Provider") +model IdentityProviderUpdateParameters { + @doc("Identity Provider update properties.") + properties?: IdentityProviderUpdateProperties; +} + +@doc("Parameters supplied to the Update Identity Provider operation.") +model IdentityProviderUpdateProperties extends IdentityProviderBaseParameters { + @doc("Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.") + @minLength(1) + clientId?: string; + + @doc("Client secret of the Application in external Identity Provider, used to authenticate login request. For example, it is App Secret for Facebook login, API Key for Google login, Public Key for Microsoft.") + @minLength(1) + clientSecret?: string; +} + @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") model ClientSecretContract { @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") @@ -2579,6 +2918,27 @@ Instrumentation key for applicationInsights logger. resourceId?: string; } +@doc("Logger update contract.") +model LoggerUpdateContract { + @doc("Logger entity update contract properties.") + properties?: LoggerUpdateParameters; +} + +@doc("Parameters supplied to the Update Logger operation.") +model LoggerUpdateParameters { + @doc("Logger type.") + loggerType?: LoggerType; + + @doc("Logger description.") + description?: string; + + @doc("Logger credentials.") + credentials?: Record; + + @doc("Whether records are buffered in the logger before publishing. Default is assumed to be true.") + isBuffered?: boolean; +} + @doc("NamedValue Contract properties.") model NamedValueContractProperties extends NamedValueEntityBaseParameters { @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") @@ -2628,6 +2988,30 @@ model NamedValueCreateContractProperties keyVault?: KeyVaultContractCreateProperties; } +@doc("NamedValue update Parameters.") +model NamedValueUpdateParameters { + @doc("NamedValue entity Update contract properties.") + properties?: NamedValueUpdateParameterProperties; +} + +@doc("NamedValue Contract properties.") +model NamedValueUpdateParameterProperties + extends NamedValueEntityBaseParameters { + @doc("Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters.") + @maxLength(256) + @minLength(1) + @pattern("^[A-Za-z0-9-._]+$") + displayName?: string; + + @doc("Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace.") + @maxLength(4096) + @minLength(1) + value?: string; + + @doc("KeyVault location details of the namedValue.") + keyVault?: KeyVaultContractCreateProperties; +} + @doc("Client or app secret used in IdentityProviders, Aad, OpenID or OAuth.") model NamedValueSecretContract { @doc("This is secret value of the NamedValue entity.") @@ -2778,6 +3162,31 @@ model OpenidConnectProviderContractProperties { clientSecret?: string; } +@doc("Parameters supplied to the Update OpenID Connect Provider operation.") +model OpenidConnectProviderUpdateContract { + @doc("OpenId Connect Provider Update contract properties.") + properties?: OpenidConnectProviderUpdateContractProperties; +} + +@doc("Parameters supplied to the Update OpenID Connect Provider operation.") +model OpenidConnectProviderUpdateContractProperties { + @doc("User-friendly OpenID Connect Provider name.") + @maxLength(50) + displayName?: string; + + @doc("User-friendly description of OpenID Connect Provider.") + description?: string; + + @doc("Metadata endpoint URI.") + metadataEndpoint?: string; + + @doc("Client ID of developer console which is the client application.") + clientId?: string; + + @doc("Client Secret of developer console which is the client application.") + clientSecret?: string; +} + @doc("Collection of Outbound Environment Endpoints") model OutboundEnvironmentEndpointList { @doc("Collection of resources.") @@ -3009,6 +3418,20 @@ model PrivateLinkResourceProperties { requiredZoneNames?: string[]; } +@doc("Product Update parameters.") +model ProductUpdateParameters { + @doc("Product entity Update contract properties.") + properties?: ProductUpdateProperties; +} + +@doc("Parameters supplied to the Update Product operation.") +model ProductUpdateProperties extends ProductEntityBaseParameters { + @doc("Product name.") + @maxLength(300) + @minLength(1) + displayName?: string; +} + @doc("Paged API list representation.") model ApiManagementProductApiListResult is Azure.Core.Page { @doc("Total record count number across all pages.") @@ -3548,6 +3971,47 @@ model SubscriptionCreateParameterProperties { allowTracing?: boolean; } +@doc("Subscription update details.") +model SubscriptionUpdateParameters { + @doc("Subscription Update contract properties.") + properties?: SubscriptionUpdateParameterProperties; +} + +@doc("Parameters supplied to the Update subscription operation.") +model SubscriptionUpdateParameterProperties { + @doc("User identifier path: /users/{userId}") + ownerId?: string; + + @doc("Scope like /products/{productId} or /apis or /apis/{apiId}") + scope?: string; + + @doc("Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expirationDate?: utcDateTime; + + @doc("Subscription name.") + displayName?: string; + + @doc("Primary subscription key.") + @maxLength(256) + @minLength(1) + primaryKey?: string; + + @doc("Secondary subscription key.") + @maxLength(256) + @minLength(1) + secondaryKey?: string; + + @doc("Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated.") + state?: SubscriptionState; + + @doc("Comments describing subscription state change by the administrator when the state is changed to the 'rejected'.") + stateComment?: string; + + @doc("Determines whether tracing can be enabled") + allowTracing?: boolean; +} + @doc("Subscription keys.") model SubscriptionKeysContract { @doc("Subscription primary key.") @@ -3600,6 +4064,18 @@ model AccessInformationCreateParameterProperties { enabled?: boolean; } +@doc("Tenant access information update parameters.") +model AccessInformationUpdateParameters { + @doc("Tenant access information update parameter properties.") + properties?: AccessInformationUpdateParameterProperties; +} + +@doc("Tenant access information update parameters of the API Management service") +model AccessInformationUpdateParameterProperties { + @doc("Determines whether direct access is enabled.") + enabled?: boolean; +} + @doc("Tenant access information contract of the API Management service.") model AccessInformationSecretsContract { @doc("Access Information type ('access' or 'gitAccess')") @@ -3773,6 +4249,33 @@ model UserCreateParameterProperties extends UserEntityBaseParameters { confirmation?: Confirmation; } +@doc("User update parameters.") +model UserUpdateParameters { + @doc("User entity update contract properties.") + properties?: UserUpdateParametersProperties; +} + +@doc("Parameters supplied to the Update User operation.") +model UserUpdateParametersProperties extends UserEntityBaseParameters { + @doc("Email address. Must not be empty and must be unique within the service instance.") + @maxLength(254) + @minLength(1) + email?: string; + + @doc("User Password.") + password?: string; + + @doc("First name.") + @maxLength(100) + @minLength(1) + firstName?: string; + + @doc("Last name.") + @maxLength(100) + @minLength(1) + lastName?: string; +} + @doc("Generate SSO Url operations response details.") model GenerateSsoUrlResult { @doc("Redirect Url containing the SSO URL value.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp index 0ffcfed5d5..c8c870a02e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-apimanagement/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Azure.ResourceManager.ApiManagement; @@ -48,7 +50,7 @@ interface TagOperations { @path subscriptionId: string; }, - TagListResult + ResourceListResult >; @doc("Gets the entity state version of the tag specified by its identifier.") @@ -238,7 +240,7 @@ interface TagOperations { @path subscriptionId: string; }, - TagListResult + ResourceListResult >; @doc("Gets the entity state version of the tag specified by its identifier.") @@ -422,7 +424,7 @@ interface TagOperations { @path subscriptionId: string; }, - TagListResult + ResourceListResult >; @doc("Gets the entity state version of the tag specified by its identifier.") @@ -624,7 +626,7 @@ interface ApiPolicyOperations { @path subscriptionId: string; }, - PolicyListResult + ResourceListResult >; @doc("Gets the entity state (Etag) version of the API policy specified by its identifier.") @@ -690,7 +692,7 @@ interface ApiPolicyOperations { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") @path @@ -858,7 +860,7 @@ interface DiagnosticOperations { @path subscriptionId: string; }, - DiagnosticListResult + ResourceListResult >; @doc("Gets the entity state (Etag) version of the Diagnostic specified by its identifier.") @@ -1066,7 +1068,7 @@ interface IssueOperations { @path subscriptionId: string; }, - IssueListResult + ResourceListResult >; @doc("Gets API Management issue details") @@ -1121,7 +1123,7 @@ interface PolicyOperations { @path subscriptionId: string; }, - PolicyListResult + ResourceListResult >; @doc("Gets the entity state (Etag) version of the Global policy definition in the Api Management service.") @@ -1173,7 +1175,7 @@ interface PolicyOperations { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") @path @@ -1276,7 +1278,7 @@ interface ProductPolicyOperations { @path subscriptionId: string; }, - PolicyListResult + ResourceListResult >; @doc("Get the ETag of the policy configuration at the Product level.") @@ -1340,7 +1342,7 @@ interface ProductPolicyOperations { @doc("Policy Export Format.") @query("format") - format?: PolicyExportFormat = "xml"; + format?: PolicyExportFormat = PolicyExportFormat.xml; @doc("Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.") @path @@ -1482,7 +1484,7 @@ interface UserSubscriptionOperations { @path subscriptionId: string; }, - SubscriptionListResult + ResourceListResult >; @doc("Gets the specified Subscription entity associated with a particular user.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md b/packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md new file mode 100644 index 0000000000..7fc7c9927f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/authorization.md @@ -0,0 +1,358 @@ +```yaml +library-name: Authorization +namespace: Azure.ResourceManager.Authorization +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/a436672b07fb1fe276c203b086b3f0e0d0c4aa24/specification/authorization/resource-manager/readme.md +tag: package-2022-04-01 +output-folder: Generated/ +skip-csproj: true + +rename-mapping: + RoleAssignment.properties.delegatedManagedIdentityResourceId: -|arm-id + DenyAssignment.properties.doNotApplyToChildScopes: IsAppliedToChildScopes + RoleAssignmentSchedule.properties.linkedRoleEligibilityScheduleId: -|arm-id + RoleAssignmentSchedule.properties.roleAssignmentScheduleRequestId: -|arm-id + RoleAssignmentScheduleInstance.properties.linkedRoleEligibilityScheduleId: -|arm-id + RoleAssignmentScheduleInstance.properties.linkedRoleEligibilityScheduleInstanceId: -|arm-id + RoleAssignmentScheduleInstance.properties.originRoleAssignmentId: -|arm-id + RoleAssignmentScheduleInstance.properties.roleAssignmentScheduleId: -|arm-id + RoleAssignmentScheduleRequest.properties.linkedRoleEligibilityScheduleId: -|arm-id + RoleAssignmentScheduleRequest.properties.targetRoleAssignmentScheduleId: -|arm-id + RoleAssignmentScheduleRequest.properties.targetRoleAssignmentScheduleInstanceId: -|arm-id + RoleEligibilitySchedule.properties.roleEligibilityScheduleRequestId: -|arm-id + RoleEligibilityScheduleInstance.properties.roleEligibilityScheduleId: -|arm-id + RoleEligibilityScheduleRequest.properties.targetRoleEligibilityScheduleId: -|arm-id + RoleEligibilityScheduleRequest.properties.targetRoleEligibilityScheduleInstanceId: -|arm-id + RoleManagementPolicyApprovalRule.setting: Settings + RoleManagementPolicyEnablementRule.enabledRules: EnablementRules + RoleManagementPolicyNotificationRule.notificationType: NotificationDeliveryType + RoleManagementPolicyNotificationRule.isDefaultRecipientsEnabled: AreDefaultRecipientsEnabled + ScopeType.managementgroup: ManagementGroup + ScopeType.resourcegroup: ResourceGroup + ApprovalMode: RoleManagementApprovalMode + ApprovalSettings: RoleManagementApprovalSettings + ApprovalStage: RoleManagementApprovalStage + AssignmentType: RoleAssignmentScheduleAssignmentType + ClassicAdministrator: AuthorizationClassicAdministrator + ClassicAdministratorListResult: AuthorizationClassicAdministratorListResult + EnablementRules: RoleAssignmentEnablementRuleType + ExpandedProperties: RoleManagementExpandedProperties + NotificationDeliveryMechanism: NotificationDeliveryType + NotificationLevel: RoleManagementPolicyNotificationLevel + Permission: RoleDefinitionPermission + PermissionGetResult: RoleDefinitionPermissionListResult + RoleDefinition: AuthorizationRoleDefinition + RoleType: AuthorizationRoleType + PolicyProperties: RoleManagementPolicyProperties + Principal: RoleManagementPrincipal + PrincipalType: RoleManagementPrincipalType + ProviderOperation: AuthorizationProviderOperationInfo + ProviderOperationsMetadata: AuthorizationProviderOperationsMetadata + ProviderOperationsMetadataListResult: AuthorizationProviderOperationsMetadataListResult + RecipientType: RoleManagementPolicyRecipientType + RoleAssignmentScheduleRequestPropertiesTicketInfo: RoleAssignmentScheduleTicketInfo + ScopeType: RoleManagementScopeType + UserSet: RoleManagementUserInfo + UserType: RoleManagementUserType + +format-by-name-rules: + "tenantId": "uuid" + "applicationId": "uuid" + "etag": "etag" + "location": "azure-location" + "principalId": "uuid" + "requestorId": "uuid" + "roleDefinitionId": "arm-id" + "policyId": "arm-id" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + +generate-arm-resource-extensions: + - /{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId} + - /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName} + - /{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName} + - /{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName} + - /{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} + - /{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName} + - /{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName} + - /{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName} + - /{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName} + - /{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName} + - /{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName} + +request-path-to-resource-type: + /{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}: Microsoft.Authorization/roleManagementPolicyAssignments + +directive: + # The requested resource does not support http method 'DELETE' + - remove-operation: "RoleManagementPolicies_Delete" + - remove-operation: "RoleManagementPolicyAssignments_Delete" + # TODO: remove dup methods with scope method, here is another issue logged https://github.com/Azure/autorest.csharp/issues/2629 + - remove-operation: "RoleAssignments_ListForSubscription" + - remove-operation: "RoleAssignments_ListForResourceGroup" + - remove-operation: "RoleAssignments_ListForResource" + # remove all ById Path + - from: authorization-RoleAssignmentsCalls.json + where: $.paths['/{roleAssignmentId}'] + transform: $ = {} + - from: authorization-RoleDefinitionsCalls.json + where: $.paths['/{roleDefinitionId}'] + transform: $ = {} + - from: authorization-RoleDefinitionsCalls.json + where: $['x-ms-paths']['/{roleId}?disambiguation_dummy'] + transform: $ = {} + - from: authorization-DenyAssignmentCalls.json + where: $.paths['/{denyAssignmentId}'] + transform: $ = {} + + - from: authorization-RoleDefinitionsCalls.json + where: $.paths['/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions'].get + transform: $.operationId = 'AzurePermissionsForResourceGroup_List' + - from: authorization-RoleDefinitionsCalls.json + where: $.paths['/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions'].get + transform: $.operationId = 'AzurePermissionsForResource_List' + + - from: authorization-RoleAssignmentsCalls.json + where: $.definitions + transform: > + $.RoleAssignmentProperties.properties.delegatedManagedIdentityResourceId["x-nullable"] = true; + - from: common-types.json + where: $.definitions + transform: > + $.RoleManagementPolicyExpirationRule.properties.maximumDuration['format'] = 'duration'; + $.UserSet.properties.id['x-ms-format'] = 'uuid'; + $.RoleManagementPolicyRuleTarget.properties.level = { + 'type': 'string', + 'description': 'The assignment level to which rule is applied.', + 'enum': [ + 'Assignment', + 'Eligibility' + ], + 'x-ms-enum': { + 'name': 'RoleManagementAssignmentLevel', + 'modelAsString': true + } + }; + $.Principal.properties.type = { + 'type': 'string', + 'description': 'Type of the principal.', + 'x-ms-client-name': 'principalType', + 'enum': [ + 'User', + 'Group', + 'ServicePrincipal', + 'ForeignGroup', + 'Device' + ], + 'x-ms-enum': { + 'name': 'principalType', + 'modelAsString': true + } + }; + delete $.Permission; + + - from: RoleAssignmentSchedule.json + where: $.definitions + transform: > + $.RoleAssignmentScheduleProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleAssignmentScheduleProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleAssignmentScheduleInstance.json + where: $.definitions + transform: > + $.RoleAssignmentScheduleInstanceProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleAssignmentScheduleInstanceProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleAssignmentScheduleRequest.json + where: $.definitions + transform: > + $.RoleAssignmentScheduleRequestProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleAssignmentScheduleRequestProperties.properties.requestType['x-ms-enum']['name'] = 'RoleManagementScheduleRequestType'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-enum']['name'] = 'RoleManagementScheduleExpirationType'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-client-name'] = 'ExpirationType'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.duration['format'] = 'duration'; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo['x-ms-client-flatten'] = true; + $.RoleAssignmentScheduleRequestProperties.properties.scheduleInfo.properties.expiration['x-ms-client-flatten'] = true; + - from: RoleEligibilitySchedule.json + where: $.definitions + transform: > + $.RoleEligibilityScheduleProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleEligibilityScheduleProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleEligibilityScheduleInstance.json + where: $.definitions + transform: > + $.RoleEligibilityScheduleInstanceProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleEligibilityScheduleInstanceProperties.properties.memberType['x-ms-enum']['name'] = 'RoleManagementScheduleMemberType'; + - from: RoleEligibilityScheduleRequest.json + where: $.definitions + transform: > + $.RoleEligibilityScheduleRequestProperties.properties.status['x-ms-enum']['name'] = 'RoleManagementScheduleStatus'; + $.RoleEligibilityScheduleRequestProperties.properties.requestType['x-ms-enum']['name'] = 'RoleManagementScheduleRequestType'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-enum']['name'] = 'RoleManagementScheduleExpirationType'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.type['x-ms-client-name'] = 'ExpirationType'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration.properties.duration['format'] = 'duration'; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo['x-ms-client-flatten'] = true; + $.RoleEligibilityScheduleRequestProperties.properties.scheduleInfo.properties.expiration['x-ms-client-flatten'] = true; + - from: RoleManagementPolicy.json + where: $.definitions + transform: > + $.PolicyProperties.properties.scope['x-ms-client-flatten'] = true; + $.PolicyProperties.properties.scope.properties.id['x-ms-format'] = 'arm-id'; + $.PolicyProperties.properties.scope.properties.id['x-ms-client-name'] = 'ScopeId'; + $.PolicyProperties.properties.scope.properties.displayName['x-ms-client-name'] = 'ScopeDisplayName'; + $.PolicyProperties.properties.scope.properties.type = { + 'type': 'string', + 'description': 'Type of the scope.', + 'x-ms-client-name': 'ScopeType', + 'enum': [ + 'subscription', + 'managementgroup', + 'resourcegroup' + ], + 'x-ms-enum': { + 'name': 'ScopeType', + 'modelAsString': true + } + }; + - from: authorization-RoleDefinitionsCalls.json + where: $.definitions + transform: > + $.RoleDefinitionProperties.properties.type = { + 'type': 'string', + 'description': 'The role type.', + 'x-ms-client-name': 'RoleType', + 'enum': [ + 'BuiltInRole', + 'CustomRole' + ], + 'x-ms-enum': { + 'name': 'RoleType', + 'modelAsString': true + } + }; + - from: authorization-ProviderOperationsCalls.json + where: $.definitions + transform: > + $.ResourceType['x-ms-client-name'] = 'AuthorizationProviderResourceType'; + $.ProviderOperation.properties.properties['x-nullable'] = true + - from: swagger-document + where: $.definitions.ExpandedProperties.properties + transform: > + $.scope['x-ms-client-flatten'] = true; + $.scope.properties.id['x-ms-format'] = 'arm-id'; + $.scope.properties.id['x-ms-client-name'] = 'ScopeId'; + $.scope.properties.displayName['x-ms-client-name'] = 'ScopeDisplayName'; + $.scope.properties.type = { + 'type': 'string', + 'description': 'Type of the scope.', + 'x-ms-client-name': 'ScopeType', + 'enum': [ + 'subscription', + 'managementgroup', + 'resourcegroup' + ], + 'x-ms-enum': { + 'name': 'ScopeType', + 'modelAsString': true + } + }; + $.roleDefinition['x-ms-client-flatten'] = true; + $.roleDefinition.properties.id['x-ms-format'] = 'arm-id'; + $.roleDefinition.properties.id['x-ms-client-name'] = 'RoleDefinitionId'; + $.roleDefinition.properties.displayName['x-ms-client-name'] = 'RoleDefinitionDisplayName'; + $.roleDefinition.properties.type = { + 'type': 'string', + 'description': 'The role type.', + 'x-ms-client-name': 'RoleType', + 'enum': [ + 'BuiltInRole', + 'CustomRole' + ], + 'x-ms-enum': { + 'name': 'RoleType', + 'modelAsString': true + } + }; + $.principal['x-ms-client-flatten'] = true; + $.principal.properties.id['x-ms-format'] = 'arm-id'; + $.principal.properties.id['x-ms-client-name'] = 'PrincipalId'; + $.principal.properties.displayName['x-ms-client-name'] = 'PrincipalDisplayName'; + $.principal.properties.type = { + 'type': 'string', + 'description': 'Type of the principal.', + 'x-ms-client-name': 'principalType', + 'enum': [ + 'User', + 'Group', + 'ServicePrincipal', + 'ForeignGroup', + 'Device' + ], + 'x-ms-enum': { + 'name': 'principalType', + 'modelAsString': true + } + }; + - from: swagger-document + where: $.definitions.PolicyAssignmentProperties.properties + transform: > + $.scope['x-ms-client-flatten'] = true; + $.scope.properties.id['x-ms-format'] = 'arm-id'; + $.scope.properties.id['x-ms-client-name'] = 'ScopeId'; + $.scope.properties.displayName['x-ms-client-name'] = 'ScopeDisplayName'; + $.scope.properties.type = { + 'type': 'string', + 'description': 'Type of the scope.', + 'x-ms-client-name': 'ScopeType', + 'enum': [ + 'subscription', + 'managementgroup', + 'resourcegroup' + ], + 'x-ms-enum': { + 'name': 'ScopeType', + 'modelAsString': true + } + }; + $.roleDefinition['x-ms-client-flatten'] = true; + $.roleDefinition.properties.id['x-ms-format'] = 'arm-id'; + $.roleDefinition.properties.id['x-ms-client-name'] = 'RoleDefinitionId'; + $.roleDefinition.properties.displayName['x-ms-client-name'] = 'RoleDefinitionDisplayName'; + $.roleDefinition.properties.type = { + 'type': 'string', + 'description': 'The role type.', + 'x-ms-client-name': 'RoleType', + 'enum': [ + 'BuiltInRole', + 'CustomRole' + ], + 'x-ms-enum': { + 'name': 'RoleType', + 'modelAsString': true + } + }; + $.policy['x-ms-client-flatten'] = true; + $.policy.properties.id['x-ms-format'] = 'arm-id'; + $.policy.properties.id['x-ms-client-name'] = 'PolicyId'; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json new file mode 100644 index 0000000000..be207770a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/resources.json @@ -0,0 +1,802 @@ +{ + "Resources": { + "DenyAssignment": { + "Name": "DenyAssignment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/denyAssignments/{denyAssignmentId}", + "Method": "GET", + "OperationID": "DenyAssignments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified deny assignment." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_ListForResource", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForResource", + "NextPageMethod": "ListForResourceNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets deny assignments for a resource." + }, + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_ListForResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForResourceGroup", + "NextPageMethod": "ListForResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets deny assignments for a resource group." + }, + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets all deny assignments for the subscription." + }, + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/denyAssignments", + "Method": "GET", + "OperationID": "DenyAssignments_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets deny assignments for a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "DenyAssignment", + "ResourceType": "Microsoft.Authorization/denyAssignments", + "ResourceKey": "denyAssignmentId", + "ResourceKeySegment": "denyAssignments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "AuthorizationProviderOperationsMetadata": { + "Name": "AuthorizationProviderOperationsMetadata", + "GetOperations": [ + { + "Name": "Get", + "Path": "/providers/Microsoft.Authorization/providerOperations/{resourceProviderNamespace}", + "Method": "GET", + "OperationID": "ProviderOperationsMetadata_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets provider operations metadata for the specified resource provider." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/providers/Microsoft.Authorization/providerOperations", + "Method": "GET", + "OperationID": "ProviderOperationsMetadata_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets provider operations metadata for all resource providers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["TenantResource"], + "SwaggerModelName": "ProviderOperationsMetadata", + "ResourceType": "Microsoft.Authorization/providerOperations", + "ResourceKey": "resourceProviderNamespace", + "ResourceKeySegment": "providerOperations", + "IsTrackedResource": false, + "IsTenantResource": true, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "RoleAssignment": { + "Name": "RoleAssignment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "GET", + "OperationID": "RoleAssignments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get a role assignment by scope and name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "PUT", + "OperationID": "RoleAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a role assignment by scope and name." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "PUT", + "OperationID": "RoleAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update a role assignment by scope and name." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}", + "Method": "DELETE", + "OperationID": "RoleAssignments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a role assignment by scope and name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignments", + "Method": "GET", + "OperationID": "RoleAssignments_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List all role assignments that apply to a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignment", + "ResourceType": "Microsoft.Authorization/roleAssignments", + "ResourceKey": "roleAssignmentName", + "ResourceKeySegment": "roleAssignments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "AuthorizationRoleDefinition": { + "Name": "AuthorizationRoleDefinition", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "GET", + "OperationID": "RoleDefinitions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get role definition by name (GUID)." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "PUT", + "OperationID": "RoleDefinitions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a role definition." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "PUT", + "OperationID": "RoleDefinitions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a role definition." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId}", + "Method": "DELETE", + "OperationID": "RoleDefinitions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a role definition." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleDefinitions", + "Method": "GET", + "OperationID": "RoleDefinitions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Get all role definitions that are applicable at scope and above." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleDefinition", + "ResourceType": "Microsoft.Authorization/roleDefinitions", + "ResourceKey": "roleDefinitionId", + "ResourceKeySegment": "roleDefinitions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleAssignmentSchedule": { + "Name": "RoleAssignmentSchedule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules/{roleAssignmentScheduleName}", + "Method": "GET", + "OperationID": "RoleAssignmentSchedules_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role assignment schedule for a resource scope" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentSchedules", + "Method": "GET", + "OperationID": "RoleAssignmentSchedules_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role assignment schedules for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignmentSchedule", + "ResourceType": "Microsoft.Authorization/roleAssignmentSchedules", + "ResourceKey": "roleAssignmentScheduleName", + "ResourceKeySegment": "roleAssignmentSchedules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleAssignmentScheduleInstance": { + "Name": "RoleAssignmentScheduleInstance", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances/{roleAssignmentScheduleInstanceName}", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleInstances_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified role assignment schedule instance." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleInstances", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleInstances_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role assignment schedule instances of a role assignment schedule." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignmentScheduleInstance", + "ResourceType": "Microsoft.Authorization/roleAssignmentScheduleInstances", + "ResourceKey": "roleAssignmentScheduleInstanceName", + "ResourceKeySegment": "roleAssignmentScheduleInstances", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleAssignmentScheduleRequest": { + "Name": "RoleAssignmentScheduleRequest", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleRequests_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role assignment schedule request." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleAssignmentScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role assignment schedule request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleAssignmentScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role assignment schedule request." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests", + "Method": "GET", + "OperationID": "RoleAssignmentScheduleRequests_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role assignment schedule requests for a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Cancel", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}/cancel", + "Method": "POST", + "OperationID": "RoleAssignmentScheduleRequests_Cancel", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Cancels a pending role assignment schedule request." + }, + { + "Name": "Validate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleAssignmentScheduleRequests/{roleAssignmentScheduleRequestName}/validate", + "Method": "POST", + "OperationID": "RoleAssignmentScheduleRequests_Validate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Validates a new role assignment schedule request." + } + ], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleAssignmentScheduleRequest", + "ResourceType": "Microsoft.Authorization/roleAssignmentScheduleRequests", + "ResourceKey": "roleAssignmentScheduleRequestName", + "ResourceKeySegment": "roleAssignmentScheduleRequests", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleEligibilitySchedule": { + "Name": "RoleEligibilitySchedule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules/{roleEligibilityScheduleName}", + "Method": "GET", + "OperationID": "RoleEligibilitySchedules_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role eligibility schedule for a resource scope" + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilitySchedules", + "Method": "GET", + "OperationID": "RoleEligibilitySchedules_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role eligibility schedules for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleEligibilitySchedule", + "ResourceType": "Microsoft.Authorization/roleEligibilitySchedules", + "ResourceKey": "roleEligibilityScheduleName", + "ResourceKeySegment": "roleEligibilitySchedules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleEligibilityScheduleInstance": { + "Name": "RoleEligibilityScheduleInstance", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances/{roleEligibilityScheduleInstanceName}", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleInstances_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the specified role eligibility schedule instance." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleInstances", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleInstances_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role eligibility schedule instances of a role eligibility schedule." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleEligibilityScheduleInstance", + "ResourceType": "Microsoft.Authorization/roleEligibilityScheduleInstances", + "ResourceKey": "roleEligibilityScheduleInstanceName", + "ResourceKeySegment": "roleEligibilityScheduleInstances", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleEligibilityScheduleRequest": { + "Name": "RoleEligibilityScheduleRequest", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleRequests_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role eligibility schedule request." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleEligibilityScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role eligibility schedule request." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}", + "Method": "PUT", + "OperationID": "RoleEligibilityScheduleRequests_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a role eligibility schedule request." + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests", + "Method": "GET", + "OperationID": "RoleEligibilityScheduleRequests_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role eligibility schedule requests for a scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Cancel", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}/cancel", + "Method": "POST", + "OperationID": "RoleEligibilityScheduleRequests_Cancel", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Cancels a pending role eligibility schedule request." + }, + { + "Name": "Validate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleEligibilityScheduleRequests/{roleEligibilityScheduleRequestName}/validate", + "Method": "POST", + "OperationID": "RoleEligibilityScheduleRequests_Validate", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Validates a new role eligibility schedule request." + } + ], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleEligibilityScheduleRequest", + "ResourceType": "Microsoft.Authorization/roleEligibilityScheduleRequests", + "ResourceKey": "roleEligibilityScheduleRequestName", + "ResourceKeySegment": "roleEligibilityScheduleRequests", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleManagementPolicy": { + "Name": "RoleManagementPolicy", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + "Method": "GET", + "OperationID": "RoleManagementPolicies_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role management policy for a resource scope" + } + ], + "CreateOperations": [], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies/{roleManagementPolicyName}", + "Method": "PATCH", + "OperationID": "RoleManagementPolicies_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update a role management policy" + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicies", + "Method": "GET", + "OperationID": "RoleManagementPolicies_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role management policies for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleManagementPolicy", + "ResourceType": "Microsoft.Authorization/roleManagementPolicies", + "ResourceKey": "roleManagementPolicyName", + "ResourceKeySegment": "roleManagementPolicies", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + }, + "RoleManagementPolicyAssignment": { + "Name": "RoleManagementPolicyAssignment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + "Method": "GET", + "OperationID": "RoleManagementPolicyAssignments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get the specified role management policy assignment for a resource scope" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + "Method": "PUT", + "OperationID": "RoleManagementPolicyAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a role management policy assignment" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments/{roleManagementPolicyAssignmentName}", + "Method": "PUT", + "OperationID": "RoleManagementPolicyAssignments_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create a role management policy assignment" + } + ], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/{scope}/providers/Microsoft.Authorization/roleManagementPolicyAssignments", + "Method": "GET", + "OperationID": "RoleManagementPolicyAssignments_ListForScope", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListForScope", + "NextPageMethod": "ListForScopeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets role management assignment policies for a resource scope." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["ArmResource"], + "SwaggerModelName": "RoleManagementPolicyAssignment", + "ResourceType": "Microsoft.Authorization/roleManagementPolicyAssignments", + "ResourceKey": "roleManagementPolicyAssignmentName", + "ResourceKeySegment": "roleManagementPolicyAssignments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": true, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp new file mode 100644 index 0000000000..dbba191362 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/DenyAssignment.tsp @@ -0,0 +1,66 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Deny Assignment") +model DenyAssignment is ExtensionResource { + @doc("The ID of the deny assignment to get.") + @path + @key("denyAssignmentId") + @segment("denyAssignments") + name: string; +} + +@armResourceOperations +interface DenyAssignments { + @doc("Get the specified deny assignment.") + get is ArmResourceRead; + + @doc("Gets deny assignments for a resource.") + listForResource is ArmResourceListByParent< + DenyAssignment, + { + ...BaseParameters; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The namespace of the resource provider.") + @path + resourceProviderNamespace: string; + + @doc("The parent resource identity.") + @path + parentResourcePath: string; + + @doc("The resource type of the resource.") + @path + resourceType: string; + + @doc("The name of the resource to get deny assignments for.") + @path + resourceName: string; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all deny assignments at or above the scope. Use $filter=denyAssignmentName eq '{name}' to search deny assignments by name at specified scope. Use $filter=principalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. Use $filter=gdprExportPrincipalId eq '{id}' to return all deny assignments at, above and below the scope for the specified principal. This filter is different from the principalId filter as it returns not only those deny assignments that contain the specified principal is the Principals list but also those deny assignments that contain the specified principal is the ExcludePrincipals list. Additionally, when gdprExportPrincipalId filter is used, only the deny assignment name and description properties are returned.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp new file mode 100644 index 0000000000..ebf7e544e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/ProviderOperationsMetadata.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +// FIXME: ProviderOperationsMetadata has no properties property +@doc("Provider Operations metadata") +@tenantResource +model ProviderOperationsMetadata is ProxyResource<{}> { + @doc("The namespace of the resource provider.") + @path + @key("resourceProviderNamespace") + @segment("providerOperations") + name: string; + + @doc("The provider display name.") + displayName?: string; + + @doc("The provider resource types") + resourceTypes?: AuthorizationProviderResourceType[]; + + @doc("The provider operations.") + operations?: ProviderOperation[]; +} + +@armResourceOperations +@projectedName("client", "ProviderOperationsMetadata") +interface ProviderOperationsMetadataOperationGroup { + @doc("Gets provider operations metadata for the specified resource provider.") + get is ArmResourceRead< + ProviderOperationsMetadata, + { + ...BaseParameters; + + @doc("Specifies whether to expand the values.") + @query("$expand") + $expand?: string = "resourceTypes"; + } + >; + + @doc("Gets provider operations metadata for all resource providers.") + list is ArmResourceListByParent< + ProviderOperationsMetadata, + { + ...BaseParameters; + + @doc("Specifies whether to expand the values.") + @query("$expand") + $expand?: string = "resourceTypes"; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp new file mode 100644 index 0000000000..4f12057895 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignment.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Assignments") +model RoleAssignment is ExtensionResource { + @doc("The name of the role assignment. It can be any valid GUID.") + @path + @key("roleAssignmentName") + @segment("roleAssignments") + name: string; +} + +@armResourceOperations +interface RoleAssignments { + @doc("Get a role assignment by scope and name.") + get is ArmResourceRead< + RoleAssignment, + { + ...BaseParameters; + + @doc("Tenant ID for cross-tenant request") + @query("tenantId") + tenantId?: string; + } + >; + + @doc("Create or update a role assignment by scope and name.") + create is ArmResourceCreateOrReplaceSync; + + @doc("Delete a role assignment by scope and name.") + delete is ArmResourceDeleteSync< + RoleAssignment, + { + ...BaseParameters; + + @doc("Tenant ID for cross-tenant request") + @query("tenantId") + tenantId?: string; + } + >; + + @doc("List all role assignments that apply to a scope.") + listForScope is ArmResourceListByParent< + RoleAssignment, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal.") + @query("$filter") + $filter?: string; + + @doc("Tenant ID for cross-tenant request") + @query("tenantId") + tenantId?: string; + + @doc("The skipToken to apply on the operation. Use $skipToken={skiptoken} to return paged role assignments following the skipToken passed. Only supported on provider level calls.") + @query("$skipToken") + $skipToken?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp new file mode 100644 index 0000000000..252768525f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentSchedule.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Assignment schedule") +model RoleAssignmentSchedule + is ExtensionResource { + @doc("The name (guid) of the role assignment schedule to get.") + @path + @key("roleAssignmentScheduleName") + @segment("roleAssignmentSchedules") + name: string; +} + +@armResourceOperations +interface RoleAssignmentSchedules { + @doc("Get the specified role assignment schedule for a resource scope") + get is ArmResourceRead; + + @doc("Gets role assignment schedules for a resource scope.") + listForScope is ArmResourceListByParent< + RoleAssignmentSchedule, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedules for the current user. Use $filter=asTarget() to return all role assignment schedules created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp new file mode 100644 index 0000000000..8d3f7c4b86 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleInstance.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Information about current or upcoming role assignment schedule instance") +model RoleAssignmentScheduleInstance + is ExtensionResource { + @doc("The name (hash of schedule name + time) of the role assignment schedule to get.") + @path + @key("roleAssignmentScheduleInstanceName") + @segment("roleAssignmentScheduleInstances") + name: string; +} + +@armResourceOperations +interface RoleAssignmentScheduleInstances { + @doc("Gets the specified role assignment schedule instance.") + get is ArmResourceRead; + + @doc("Gets role assignment schedule instances of a role assignment schedule.") + listForScope is ArmResourceListByParent< + RoleAssignmentScheduleInstance, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role assignment schedule instances for the user. Use $filter=asTarget() to return all role assignment schedule instances created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp new file mode 100644 index 0000000000..74751c9ea9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleAssignmentScheduleRequest.tsp @@ -0,0 +1,53 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Assignment schedule request") +model RoleAssignmentScheduleRequest + is ExtensionResource { + @doc("The name (guid) of the role assignment schedule request to get.") + @path + @key("roleAssignmentScheduleRequestName") + @segment("roleAssignmentScheduleRequests") + name: string; +} + +@armResourceOperations +interface RoleAssignmentScheduleRequests { + @doc("Get the specified role assignment schedule request.") + get is ArmResourceRead; + + @doc("Creates a role assignment schedule request.") + create is ArmResourceCreateOrReplaceSync; + + @doc("Gets role assignment schedule requests for a scope.") + listForScope is ArmResourceListByParent< + RoleAssignmentScheduleRequest, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role assignment schedule requests requested by the current user. Use $filter=asTarget() to return all role assignment schedule requests created for the current user. Use $filter=asApprover() to return all role assignment schedule requests where the current user is an approver.") + @query("$filter") + $filter?: string; + } + >; + + @doc("Cancels a pending role assignment schedule request.") + cancel is ArmResourceActionSync; + + @doc("Validates a new role assignment schedule request.") + validate is ArmResourceActionSync< + RoleAssignmentScheduleRequest, + RoleAssignmentScheduleRequest, + RoleAssignmentScheduleRequest + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp new file mode 100644 index 0000000000..675b042085 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleDefinition.tsp @@ -0,0 +1,45 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role definition.") +model RoleDefinition is ExtensionResource { + @doc("The ID of the role definition.") + @path + @key("roleDefinitionId") + @segment("roleDefinitions") + name: string; +} + +@armResourceOperations +interface RoleDefinitions { + @doc("Get role definition by name (GUID).") + get is ArmResourceRead; + + @doc("Creates or updates a role definition.") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + @doc("Deletes a role definition.") + delete is ArmResourceDeleteSync; + + @doc("Get all role definitions that are applicable at scope and above.") + list is ArmResourceListByParent< + RoleDefinition, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp new file mode 100644 index 0000000000..fe16e2f188 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilitySchedule.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role eligibility schedule") +model RoleEligibilitySchedule + is ExtensionResource { + @doc("The name (guid) of the role eligibility schedule to get.") + @path + @key("roleEligibilityScheduleName") + @segment("roleEligibilitySchedules") + name: string; +} + +@armResourceOperations +interface RoleEligibilitySchedules { + @doc("Get the specified role eligibility schedule for a resource scope") + get is ArmResourceRead; + + @doc("Gets role eligibility schedules for a resource scope.") + listForScope is ArmResourceListByParent< + RoleEligibilitySchedule, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedules at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp new file mode 100644 index 0000000000..6b4c4690ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleInstance.tsp @@ -0,0 +1,40 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Information about current or upcoming role eligibility schedule instance") +model RoleEligibilityScheduleInstance + is ExtensionResource { + @doc("The name (hash of schedule name + time) of the role eligibility schedule to get.") + @path + @key("roleEligibilityScheduleInstanceName") + @segment("roleEligibilityScheduleInstances") + name: string; +} + +@armResourceOperations +interface RoleEligibilityScheduleInstances { + @doc("Gets the specified role eligibility schedule instance.") + get is ArmResourceRead; + + @doc("Gets role eligibility schedule instances of a role eligibility schedule.") + listForScope is ArmResourceListByParent< + RoleEligibilityScheduleInstance, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role assignment schedules at or above the scope. Use $filter=principalId eq {id} to return all role assignment schedules at, above or below the scope for the specified principal. Use $filter=assignedTo('{userId}') to return all role eligibility schedules for the user. Use $filter=asTarget() to return all role eligibility schedules created for the current user.") + @query("$filter") + $filter?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp new file mode 100644 index 0000000000..c0a6fe274b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleEligibilityScheduleRequest.tsp @@ -0,0 +1,53 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role Eligibility schedule request") +model RoleEligibilityScheduleRequest + is ExtensionResource { + @doc("The name (guid) of the role eligibility schedule request to get.") + @path + @key("roleEligibilityScheduleRequestName") + @segment("roleEligibilityScheduleRequests") + name: string; +} + +@armResourceOperations +interface RoleEligibilityScheduleRequests { + @doc("Get the specified role eligibility schedule request.") + get is ArmResourceRead; + + @doc("Creates a role eligibility schedule request.") + create is ArmResourceCreateOrReplaceSync; + + @doc("Gets role eligibility schedule requests for a scope.") + listForScope is ArmResourceListByParent< + RoleEligibilityScheduleRequest, + { + ...BaseParameters; + + @doc("The filter to apply on the operation. Use $filter=atScope() to return all role eligibility schedule requests at or above the scope. Use $filter=principalId eq {id} to return all role eligibility schedule requests at, above or below the scope for the specified principal. Use $filter=asRequestor() to return all role eligibility schedule requests requested by the current user. Use $filter=asTarget() to return all role eligibility schedule requests created for the current user. Use $filter=asApprover() to return all role eligibility schedule requests where the current user is an approver.") + @query("$filter") + $filter?: string; + } + >; + + @doc("Cancels a pending role eligibility schedule request.") + cancel is ArmResourceActionSync; + + @doc("Validates a new role eligibility schedule request.") + validate is ArmResourceActionSync< + RoleEligibilityScheduleRequest, + RoleEligibilityScheduleRequest, + RoleEligibilityScheduleRequest + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp new file mode 100644 index 0000000000..d971793eeb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicy.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role management policy") +model RoleManagementPolicy + is ExtensionResource { + @doc("The name (guid) of the role management policy to get.") + @path + @key("roleManagementPolicyName") + @segment("roleManagementPolicies") + name: string; +} + +@armResourceOperations +interface RoleManagementPolicies { + @doc("Get the specified role management policy for a resource scope") + get is ArmResourceRead; + + @doc("Update a role management policy") + update is ArmCustomPatchSync; + + @doc("Gets role management policies for a resource scope.") + listForScope is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp new file mode 100644 index 0000000000..614aa7d9ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/RoleManagementPolicyAssignment.tsp @@ -0,0 +1,34 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Authorization; +@doc("Role management policy") +model RoleManagementPolicyAssignment + is ExtensionResource { + @doc("The name of format {guid_guid} the role management policy assignment to get.") + @path + @key("roleManagementPolicyAssignmentName") + @segment("roleManagementPolicyAssignments") + name: string; +} + +@armResourceOperations +interface RoleManagementPolicyAssignments { + @doc("Get the specified role management policy assignment for a resource scope") + get is ArmResourceRead; + + @doc("Create a role management policy assignment") + create is ArmResourceCreateOrReplaceSync; + + @doc("Gets role management assignment policies for a resource scope.") + listForScope is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json new file mode 100644 index 0000000000..7919be4d3f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_Get.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "denyAssignmentId": "denyAssignmentId", + "scope": "subscriptions/subId/resourcegroups/rgname" + }, + "responses": { + "200": { + "body": { + "name": "denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "id": "/subscriptions/subId/resourcegroups/rgname/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "properties": { + "description": "Deny assignment description", + "denyAssignmentName": "Deny assignment name", + "doNotApplyToChildScopes": false, + "excludePrincipals": [ + { + "type": "principalType2", + "id": "principalId2" + } + ], + "isSystemProtected": true, + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [], + "notActions": [], + "notDataActions": [] + } + ], + "principals": [ + { + "type": "principalType1", + "id": "principalId1" + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname" + } + } + } + }, + "operationId": "DenyAssignments_Get", + "title": "Get deny assignment by name" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json new file mode 100644 index 0000000000..cb860218eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/DenyAssignments_ListForResource.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parentResourcePath": "parentResourcePath", + "resourceGroupName": "rgname", + "resourceName": "resourceName", + "resourceProviderNamespace": "resourceProviderNamespace", + "resourceType": "resourceType", + "subscriptionId": "subId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "denyAssignmentId", + "type": "Microsoft.Authorization/denyAssignments", + "id": "/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName/providers/Microsoft.Authorization/denyAssignments/denyAssignmentId", + "properties": { + "description": "Deny assignment description", + "denyAssignmentName": "Deny assignment name", + "doNotApplyToChildScopes": false, + "excludePrincipals": [ + { + "type": "principalType2", + "id": "principalId2" + } + ], + "isSystemProtected": true, + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "action" + ], + "notActions": [], + "notDataActions": [] + } + ], + "principals": [ + { + "type": "principalType1", + "id": "principalId1" + } + ], + "scope": "/subscriptions/subId/resourcegroups/rgname/providers/resourceProviderNamespace/parentResourcePath/resourceType/resourceName" + } + } + ] + } + } + }, + "operationId": "DenyAssignments_ListForResource", + "title": "List deny assignments for resource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json new file mode 100644 index 0000000000..aff522ebfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "resourceProviderNamespace": "resourceProviderNamespace" + }, + "responses": { + "200": { + "body": { + "name": "name", + "type": "type", + "displayName": "displayName", + "id": "id", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [] + } + ], + "operations": [] + } + } + }, + "operationId": "ProviderOperationsMetadata_Get", + "title": "List provider operations metadata for resource provider" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json new file mode 100644 index 0000000000..096889bb4a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/ProviderOperationsMetadata_List.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-04-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "name", + "type": "type", + "displayName": "displayName", + "id": "id", + "resourceTypes": [ + { + "name": "name", + "displayName": "name", + "operations": [] + } + ], + "operations": [] + } + ] + } + } + }, + "operationId": "ProviderOperationsMetadata_List", + "title": "List provider operations metadata for all resource providers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json new file mode 100644 index 0000000000..f1c224390f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_Get.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleInstanceName": "ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "type": "Microsoft.Authorization/RoleAssignmentScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "linkedRoleEligibilityScheduleInstanceId": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "memberType": "Direct", + "originRoleAssignmentId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Accepted" + } + } + } + }, + "operationId": "RoleAssignmentScheduleInstances_Get", + "title": "GetRoleAssignmentScheduleInstanceByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json new file mode 100644 index 0000000000..cc3e8342ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleInstances_ListForScope.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "type": "Microsoft.Authorization/RoleAssignmentScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleInstances/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "linkedRoleEligibilityScheduleInstanceId": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "memberType": "Direct", + "originRoleAssignmentId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleAssignments/ed9b8180-cef7-4c77-a63c-b8566ecfc412", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Accepted" + } + } + ] + } + } + }, + "operationId": "RoleAssignmentScheduleInstances_ListForScope", + "title": "GetRoleAssignmentScheduleInstancesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json new file mode 100644 index 0000000000..602066d456 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Cancel.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": {} + }, + "operationId": "RoleAssignmentScheduleRequests_Cancel", + "title": "CancelRoleAssignmentScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json new file mode 100644 index 0000000000..1dbd0af260 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Create.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "SelfActivate", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + } + } + }, + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "201": { + "body": { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_Create", + "title": "PutRoleAssignmentScheduleRequest" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json new file mode 100644 index 0000000000..4354473d26 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_Get", + "title": "GetRoleAssignmentScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json new file mode 100644 index 0000000000..fefc2967ad --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_ListForScope.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$filter": "assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + ] + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_ListForScope", + "title": "GetRoleAssignmentScheduleRequestByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json new file mode 100644 index 0000000000..c8aa6be61c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentScheduleRequests_Validate.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "SelfActivate", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + } + } + }, + "roleAssignmentScheduleRequestName": "fea7a502-9a96-4806-a26f-eee560e52045", + "scope": "subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "fea7a502-9a96-4806-a26f-eee560e52045", + "type": "Microsoft.Authorization/RoleAssignmentScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "SelfActivate", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "PT8H", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:35:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleAssignmentScheduleId": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "targetRoleAssignmentScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleAssignmentScheduleRequests_Validate", + "title": "ValidateRoleAssignmentScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json new file mode 100644 index 0000000000..94dda03dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_Get.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleAssignmentScheduleName": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "type": "Microsoft.Authorization/RoleAssignmentSchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T21:35:27.91Z" + } + } + } + }, + "operationId": "RoleAssignmentSchedules_Get", + "title": "GetRoleAssignmentScheduleByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json new file mode 100644 index 0000000000..ac9677d329 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignmentSchedules_ListForScope.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "type": "Microsoft.Authorization/RoleAssignmentSchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentSchedules/c9e264ff-3133-4776-a81a-ebc7c33c8ec6", + "properties": { + "assignmentType": "Assigned", + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:35:27.91Z", + "endDateTime": "2020-09-10T05:35:17.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "linkedRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleAssignmentScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleAssignmentScheduleRequests/fea7a502-9a96-4806-a26f-eee560e52045", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:35:27.91Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T21:35:27.91Z" + } + } + ] + } + } + }, + "operationId": "RoleAssignmentSchedules_ListForScope", + "title": "GetRoleAssignmentSchedulesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json new file mode 100644 index 0000000000..a777ec998f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResource.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d" + } + }, + "roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account" + }, + "responses": { + "200": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account" + } + } + }, + "201": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.DocumentDb/databaseAccounts/test-db-account" + } + } + } + }, + "operationId": "RoleAssignments_Create", + "title": "Create role assignment for resource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json new file mode 100644 index 0000000000..3893b3471e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForResourceGroup.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d" + } + }, + "roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg" + }, + "responses": { + "200": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg" + } + } + }, + "201": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/resourceGroups/testrg" + } + } + } + }, + "operationId": "RoleAssignments_Create", + "title": "Create role assignment for resource group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json new file mode 100644 index 0000000000..302351b166 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Create_CreateRoleAssignmentForSubscription.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d" + } + }, + "roleAssignmentName": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + }, + "201": { + "body": { + "name": "05c5a614-a7d6-4502-b150-c2fb455033ff", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/05c5a614-a7d6-4502-b150-c2fb455033ff", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + } + }, + "operationId": "RoleAssignments_Create", + "title": "Create role assignment for subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json new file mode 100644 index 0000000000..a881ab6396 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Delete.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleAssignmentName": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "name": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + }, + "204": {} + }, + "operationId": "RoleAssignments_Delete", + "title": "Delete role assignment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json new file mode 100644 index 0000000000..bcfc45917c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleAssignmentName": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "name": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + } + }, + "operationId": "RoleAssignments_Get", + "title": "Get role assignment by scope and name" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json new file mode 100644 index 0000000000..ccc325bfa6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleAssignments_ListForScope.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "scope": "subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "b0f43c54-e787-4862-89b1-a653fa9cf747", + "type": "Microsoft.Authorization/roleAssignments", + "id": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2/providers/Microsoft.Authorization/roleAssignments/b0f43c54-e787-4862-89b1-a653fa9cf747", + "properties": { + "principalId": "ce2ce14e-85d7-4629-bdbc-454d0519d987", + "principalType": "User", + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/0b5fe924-9a61-425c-96af-cfe6e287ca2d", + "scope": "/subscriptions/a925f2f7-5c63-4b7b-8799-25a5f97bc3b2" + } + } + ] + } + } + }, + "operationId": "RoleAssignments_ListForScope", + "title": "List role assignments for scope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json new file mode 100644 index 0000000000..818fbeb7c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_CreateOrUpdate.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "body": { + "roleDefinition": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + }, + "roleDefinition": {}, + "roleDefinitionId": "roleDefinitionId", + "scope": "scope" + }, + "responses": { + "201": { + "body": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + } + }, + "operationId": "RoleDefinitions_CreateOrUpdate", + "title": "Create role definition" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json new file mode 100644 index 0000000000..5b1948c2d6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Delete.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleDefinitionId": "roleDefinitionId", + "scope": "scope" + }, + "responses": { + "200": { + "body": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + }, + "204": {} + }, + "operationId": "RoleDefinitions_Delete", + "title": "Delete role definition" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json new file mode 100644 index 0000000000..adb7e0e3a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "roleDefinitionId": "roleDefinitionId", + "scope": "scope" + }, + "responses": { + "200": { + "body": { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + } + }, + "operationId": "RoleDefinitions_Get", + "title": "Get role definition by name" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json new file mode 100644 index 0000000000..cccbaa5ca3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleDefinitions_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "scope": "scope" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "roleDefinitionId", + "type": "Microsoft.Authorization/roleDefinitions", + "id": "/subscriptions/subID/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId", + "properties": { + "type": "roletype", + "description": "Role description", + "assignableScopes": [ + "/subscriptions/subId" + ], + "permissions": [ + { + "actions": [ + "action" + ], + "dataActions": [ + "dataAction" + ], + "notActions": [], + "notDataActions": [] + } + ], + "roleName": "Role name" + } + } + ] + } + } + }, + "operationId": "RoleDefinitions_List", + "title": "List role definitions for scope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json new file mode 100644 index 0000000000..e06200fdfd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_Get.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleInstanceName": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "type": "Microsoft.Authorization/RoleEligibilityScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-10T00:32:36.86Z", + "endDateTime": "2021-09-10T00:31:41.477Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-10T00:32:36.86Z", + "status": "Provisioned" + } + } + } + }, + "operationId": "RoleEligibilityScheduleInstances_Get", + "title": "GetRoleEligibilityScheduleInstanceByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json new file mode 100644 index 0000000000..518c9d7902 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleInstances_ListForScope.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "type": "Microsoft.Authorization/RoleEligibilityScheduleInstances", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleInstances/21e4b59a-0499-4fe0-a3c3-43a3055b773a", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-10T00:32:36.86Z", + "endDateTime": "2021-09-10T00:31:41.477Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-10T00:32:36.86Z", + "status": "Provisioned" + } + } + ] + } + } + }, + "operationId": "RoleEligibilityScheduleInstances_ListForScope", + "title": "GetRoleEligibilityScheduleInstancesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json new file mode 100644 index 0000000000..d3c1d6f0e8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Cancel.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": {} + }, + "operationId": "RoleEligibilityScheduleRequests_Cancel", + "title": "CancelRoleEligibilityScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json new file mode 100644 index 0000000000..9c4e6a7ece --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Create.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "AdminAssign", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + } + } + }, + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "201": { + "body": { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_Create", + "title": "PutRoleEligibilityScheduleRequest" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json new file mode 100644 index 0000000000..c65cf576c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_Get", + "title": "GetRoleEligibilityScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json new file mode 100644 index 0000000000..1416d1425e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_ListForScope.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$filter": "assignedTo('A3BB8764-CB92-4276-9D2A-CA1E895E55EA')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + ] + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_ListForScope", + "title": "GetRoleEligibilityScheduleRequestByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json new file mode 100644 index 0000000000..b30ee03573 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilityScheduleRequests_Validate.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2022-04-01", + "parameters": { + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "requestType": "AdminAssign", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + } + } + }, + "roleEligibilityScheduleRequestName": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "64caffb6-55c0-4deb-a585-68e948ea1ad6", + "type": "Microsoft.Authorization/RoleEligibilityScheduleRequests", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "properties": { + "approvalId": null, + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:32:27.91Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "justification": null, + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "requestType": "AdminAssign", + "requestorId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608", + "scheduleInfo": { + "expiration": { + "type": "AfterDuration", + "duration": "P365D", + "endDateTime": null + }, + "startDateTime": "2020-09-09T21:31:27.91Z" + }, + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "status": "Provisioned", + "targetRoleEligibilityScheduleId": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "targetRoleEligibilityScheduleInstanceId": null, + "ticketInfo": { + "ticketNumber": null, + "ticketSystem": null + } + } + } + } + }, + "operationId": "RoleEligibilityScheduleRequests_Validate", + "title": "ValidateRoleEligibilityScheduleRequestByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json new file mode 100644 index 0000000000..a7f7b80d0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_Get.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleEligibilityScheduleName": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "name": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "type": "Microsoft.Authorization/RoleEligibilitySchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:33:06.3Z", + "endDateTime": "2021-09-09T21:32:28.49Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:33:14.557Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T22:27:00.513Z" + } + } + } + }, + "operationId": "RoleEligibilitySchedules_Get", + "title": "GetRoleEligibilityScheduleByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json new file mode 100644 index 0000000000..aff30cf638 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleEligibilitySchedules_ListForScope.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "$filter": "assignedTo('a3bb8764-cb92-4276-9d2a-ca1e895e55ea')", + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "b1477448-2cc6-4ceb-93b4-54a202a89413", + "type": "Microsoft.Authorization/RoleEligibilitySchedules", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilitySchedules/b1477448-2cc6-4ceb-93b4-54a202a89413", + "properties": { + "condition": "@Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'", + "conditionVersion": "1.0", + "createdOn": "2020-09-09T21:33:06.3Z", + "endDateTime": "2021-09-09T21:32:28.49Z", + "expandedProperties": { + "principal": { + "type": "User", + "displayName": "User Account", + "email": "user@my-tenant.com", + "id": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea" + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "Contributor", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/c8d4ff99-41c3-41a8-9f60-21dfdad59608" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f" + } + }, + "memberType": "Direct", + "principalId": "a3bb8764-cb92-4276-9d2a-ca1e895e55ea", + "principalType": "User", + "roleDefinitionId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "roleEligibilityScheduleRequestId": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f/providers/Microsoft.Authorization/RoleEligibilityScheduleRequests/64caffb6-55c0-4deb-a585-68e948ea1ad6", + "scope": "/subscriptions/dfa2a084-766f-4003-8ae1-c4aeb893a99f", + "startDateTime": "2020-09-09T21:33:14.557Z", + "status": "Provisioned", + "updatedOn": "2020-09-09T22:27:00.513Z" + } + } + ] + } + } + }, + "operationId": "RoleEligibilitySchedules_ListForScope", + "title": "GetRoleEligibilitySchedulesByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json new file mode 100644 index 0000000000..21d801685d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Get.json @@ -0,0 +1,734 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleManagementPolicyName": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T02:54:27.167+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicies_Get", + "title": "GetRoleManagementPolicyByName" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json new file mode 100644 index 0000000000..950fd57624 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_ListForScope.json @@ -0,0 +1,737 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T02:54:27.167+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + ] + } + } + }, + "operationId": "RoleManagementPolicies_ListForScope", + "title": "GetRoleManagementPolicyByRoleDefinitionFilter" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json new file mode 100644 index 0000000000..80f9eae7d5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchPartialRoleManagementPolicy.json @@ -0,0 +1,777 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ] + } + }, + "roleManagementPolicyName": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T16:35:27.91+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicies_Update", + "title": "PatchPartialRoleManagementPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json new file mode 100644 index 0000000000..3bcffc77bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicies_Update_PatchRoleManagementPolicy.json @@ -0,0 +1,1086 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ] + } + }, + "roleManagementPolicyName": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "570c3619-7688-4b34-b290-2b8bb3ccab2a", + "type": "Microsoft.Authorization/RoleManagementPolicies", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/570c3619-7688-4b34-b290-2b8bb3ccab2a", + "properties": { + "description": null, + "displayName": null, + "effectiveRules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "isOrganizationDefault": false, + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": "2021-03-17T16:35:27.91+00:00", + "policyProperties": { + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "rules": [ + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": false, + "maximumDuration": "P180D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "Justification", + "MultiFactorAuthentication", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicies_Update", + "title": "PatchRoleManagementPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json new file mode 100644 index 0000000000..c3db89a9d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Create.json @@ -0,0 +1,395 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "parameters": { + "properties": { + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "roleManagementPolicyAssignmentName": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "201": { + "body": { + "name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "type": "Microsoft.Authorization/RoleManagementPolicyAssignment", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "properties": { + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "policyAssignmentProperties": { + "policy": { + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "lastModifiedBy": null, + "lastModifiedDateTime": null + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "FHIR Data Converter", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicyAssignments_Create", + "title": "PutRoleManagementPolicyAssignment" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json new file mode 100644 index 0000000000..864ffbb61a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_Get.json @@ -0,0 +1,393 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "roleManagementPolicyAssignmentName": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "type": "Microsoft.Authorization/RoleManagementPolicyAssignment", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "properties": { + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "policyAssignmentProperties": { + "policy": { + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": null + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "FHIR Data Converter", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + } + }, + "operationId": "RoleManagementPolicyAssignments_Get", + "title": "GetConfigurations" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json new file mode 100644 index 0000000000..ff8cff5f19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/examples/2015-07-01/RoleManagementPolicyAssignments_ListForScope.json @@ -0,0 +1,396 @@ +{ + "parameters": { + "api-version": "2020-10-01", + "scope": "providers/Microsoft.Subscription/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "type": "Microsoft.Authorization/RoleManagementPolicyAssignment", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicyAssignment/b959d571-f0b5-4042-88a7-01be6cb22db9_a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "properties": { + "effectiveRules": [ + { + "enabledRules": [], + "id": "Enablement_Admin_Eligibility", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Eligibility", + "isExpirationRequired": true, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Eligibility", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_eligible@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Eligibility", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification" + ], + "id": "Enablement_Admin_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_Admin_Assignment", + "isExpirationRequired": false, + "maximumDuration": "P90D", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_Admin_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "approver_admin_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "Admin", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Approval_EndUser_Assignment", + "ruleType": "RoleManagementPolicyApprovalRule", + "setting": { + "approvalMode": "SingleStage", + "approvalStages": [ + { + "approvalStageTimeOutInDays": 1, + "escalationApprovers": null, + "escalationTimeInMinutes": 0, + "isApproverJustificationRequired": true, + "isEscalationEnabled": false, + "primaryApprovers": [ + { + "description": "amansw_new_group", + "id": "2385b0f3-5fa9-43cf-8ca4-b01dc97298cd", + "isBackup": false, + "userType": "Group" + }, + { + "description": "amansw_group", + "id": "2f4913c9-d15b-406a-9946-1d66a28f2690", + "isBackup": false, + "userType": "Group" + } + ] + } + ], + "isApprovalRequired": true, + "isApprovalRequiredForExtension": false, + "isRequestorJustificationRequired": true + }, + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "claimValue": "", + "id": "AuthenticationContext_EndUser_Assignment", + "isEnabled": false, + "ruleType": "RoleManagementPolicyAuthenticationContextRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "enabledRules": [ + "MultiFactorAuthentication", + "Justification", + "Ticketing" + ], + "id": "Enablement_EndUser_Assignment", + "ruleType": "RoleManagementPolicyEnablementRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Expiration_EndUser_Assignment", + "isExpirationRequired": true, + "maximumDuration": "PT7H", + "ruleType": "RoleManagementPolicyExpirationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Admin_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "admin_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Admin", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Requestor_EndUser_Assignment", + "isDefaultRecipientsEnabled": false, + "notificationLevel": "Critical", + "notificationRecipients": [ + "requestor_enduser_member@test.com" + ], + "notificationType": "Email", + "recipientType": "Requestor", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + }, + { + "id": "Notification_Approver_EndUser_Assignment", + "isDefaultRecipientsEnabled": true, + "notificationLevel": "Critical", + "notificationRecipients": null, + "notificationType": "Email", + "recipientType": "Approver", + "ruleType": "RoleManagementPolicyNotificationRule", + "target": { + "caller": "EndUser", + "enforcedSettings": null, + "inheritableSettings": null, + "level": "Assignment", + "targetObjects": null, + "operations": [ + "All" + ] + } + } + ], + "policyAssignmentProperties": { + "policy": { + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "lastModifiedBy": { + "type": null, + "displayName": "Admin", + "email": null, + "id": null + }, + "lastModifiedDateTime": null + }, + "roleDefinition": { + "type": "BuiltInRole", + "displayName": "FHIR Data Converter", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24" + }, + "scope": { + "type": "subscription", + "displayName": "Pay-As-You-Go", + "id": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + }, + "policyId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleManagementPolicies/b959d571-f0b5-4042-88a7-01be6cb22db9", + "roleDefinitionId": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368/providers/Microsoft.Authorization/roleDefinitions/a1705bd2-3a8f-45a5-8683-466fcfd5cc24", + "scope": "/subscriptions/129ff972-28f8-46b8-a726-e497be039368" + } + } + ] + } + } + }, + "operationId": "RoleManagementPolicyAssignments_ListForScope", + "title": "GetRoleManagementPolicyAssignmentByScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp new file mode 100644 index 0000000000..02da08350a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/main.tsp @@ -0,0 +1,52 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./DenyAssignment.tsp"; +import "./ProviderOperationsMetadata.tsp"; +import "./RoleAssignment.tsp"; +import "./RoleDefinition.tsp"; +import "./RoleAssignmentSchedule.tsp"; +import "./RoleAssignmentScheduleInstance.tsp"; +import "./RoleAssignmentScheduleRequest.tsp"; +import "./RoleEligibilitySchedule.tsp"; +import "./RoleEligibilityScheduleInstance.tsp"; +import "./RoleEligibilityScheduleRequest.tsp"; +import "./RoleManagementPolicy.tsp"; +import "./RoleManagementPolicyAssignment.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "AuthorizationManagementClient", +}) +@versioned(Versions) +// FIXME: Common type version v2 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v2) +@doc("Role based access control provides you a way to apply granular level policy administration down to individual resources or resource groups. These operations enable you to manage role definitions and role assignments. A role definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure Active Directory users.") +namespace Azure.ResourceManager.Authorization; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2015-07-01 API version.") + v2015_07_01: "2015-07-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-04-01 API version.") + v2022_04_01: "2022-04-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2020-10-01 API version.") + v2020_10_01: "2020-10-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp new file mode 100644 index 0000000000..8c5e9ec9a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/models.tsp @@ -0,0 +1,1270 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.Authorization; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("The principal type of the assigned principal ID.") +enum PrincipalType { + User, + Group, + ServicePrincipal, + ForeignGroup, + Device, +} + +@doc("The role type.") +enum RoleType { + BuiltInRole, + CustomRole, +} + +@doc("Assignment type of the role assignment schedule") +enum AssignmentType { + Activated, + Assigned, +} + +@doc("Membership type of the role assignment schedule") +enum RoleManagementScheduleMemberType { + Inherited, + Direct, + Group, +} + +@doc("The status of the role assignment schedule.") +enum RoleManagementScheduleStatus { + Accepted, + PendingEvaluation, + Granted, + Denied, + PendingProvisioning, + Provisioned, + PendingRevocation, + Revoked, + Canceled, + Failed, + PendingApprovalProvisioning, + PendingApproval, + FailedAsResourceIsLocked, + PendingAdminDecision, + AdminApproved, + AdminDenied, + TimedOut, + ProvisioningStarted, + Invalid, + PendingScheduleCreation, + ScheduleCreated, + PendingExternalProvisioning, +} + +@doc("Type of the scope.") +enum ScopeType { + subscription, + managementgroup, + resourcegroup, +} + +@doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") +enum RoleManagementScheduleRequestType { + AdminAssign, + AdminRemove, + AdminUpdate, + AdminExtend, + AdminRenew, + SelfActivate, + SelfDeactivate, + SelfExtend, + SelfRenew, +} + +@doc("Type of the role assignment schedule expiration") +enum RoleManagementScheduleExpirationType { + AfterDuration, + AfterDateTime, + NoExpiration, +} + +@doc("The type of rule") +enum RoleManagementPolicyRuleType { + RoleManagementPolicyApprovalRule, + RoleManagementPolicyAuthenticationContextRule, + RoleManagementPolicyEnablementRule, + RoleManagementPolicyExpirationRule, + RoleManagementPolicyNotificationRule, +} + +@doc("The assignment level to which rule is applied.") +enum RoleManagementAssignmentLevel { + Assignment, + Eligibility, +} + +@doc("The type of rule") +enum ApprovalMode { + SingleStage, + Serial, + Parallel, + NoApproval, +} + +@doc("The type of user.") +enum UserType { + User, + Group, +} + +@doc("The type of enablement rule") +enum EnablementRules { + MultiFactorAuthentication, + Justification, + Ticketing, +} + +@doc("The type of notification.") +enum NotificationDeliveryMechanism { + Email, +} + +@doc("The notification level.") +enum NotificationLevel { + None, + Critical, + All, +} + +@doc("The recipient type.") +enum RecipientType { + Requestor, + Approver, + Admin, +} + +@doc("ClassicAdministrator list result information.") +model ClassicAdministratorListResult is Azure.Core.Page; + +@doc("Classic Administrators") +model ClassicAdministrator { + @doc("The ID of the administrator.") + id?: string; + + @doc("The name of the administrator.") + name?: string; + + @doc("The type of the administrator.") + type?: string; + + @doc("Properties for the classic administrator.") + properties?: ClassicAdministratorProperties; +} + +@doc("Classic Administrator properties.") +model ClassicAdministratorProperties { + @doc("The email address of the administrator.") + emailAddress?: string; + + @doc("The role of the administrator.") + role?: string; +} + +@doc("Deny assignment properties.") +model DenyAssignmentProperties { + @doc("The display name of the deny assignment.") + denyAssignmentName?: string; + + @doc("The description of the deny assignment.") + description?: string; + + @doc("An array of permissions that are denied by the deny assignment.") + permissions?: DenyAssignmentPermission[]; + + @doc("The deny assignment scope.") + scope?: string; + + @doc("Determines if the deny assignment applies to child scopes. Default value is false.") + doNotApplyToChildScopes?: boolean; + + @doc("Array of principals to which the deny assignment applies.") + principals?: Principal[]; + + @doc("Array of principals to which the deny assignment does not apply.") + excludePrincipals?: Principal[]; + + @doc("Specifies whether this deny assignment was created by Azure and cannot be edited or deleted.") + isSystemProtected?: boolean; +} + +@doc("Deny assignment permissions.") +model DenyAssignmentPermission { + @doc("Actions to which the deny assignment does not grant access.") + actions?: string[]; + + @doc("Actions to exclude from that the deny assignment does not grant access.") + notActions?: string[]; + + @doc("Data actions to which the deny assignment does not grant access.") + dataActions?: string[]; + + @doc("Data actions to exclude from that the deny assignment does not grant access.") + notDataActions?: string[]; + + @doc("The conditions on the Deny assignment permission. This limits the resources it applies to.") + condition?: string; + + @doc("Version of the condition.") + conditionVersion?: string; +} + +@doc("The name of the entity last modified it") +model Principal { + @doc("The id of the principal made changes") + id?: string; + + @doc("The name of the principal made changes") + displayName?: string; + + @doc("Type of the principal.") + @projectedName("json", "type") + principalType?: PrincipalType; + + @doc("Email of principal") + email?: string; +} + +@doc("Resource Type") +model AuthorizationProviderResourceType { + @doc("The resource type name.") + name?: string; + + @doc("The resource type display name.") + displayName?: string; + + @doc("The resource type operations.") + operations?: ProviderOperation[]; +} + +@doc("Operation") +model ProviderOperation { + @doc("The operation name.") + name?: string; + + @doc("The operation display name.") + displayName?: string; + + @doc("The operation description.") + description?: string; + + @doc("The operation origin.") + origin?: string; + + @doc("The operation properties.") + properties?: Record; + + @doc("The dataAction flag to specify the operation type.") + isDataAction?: boolean; +} + +@doc("Role assignment properties.") +model RoleAssignmentProperties { + @doc("The role assignment scope.") + @visibility("read") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId: string; + + @doc("The principal ID.") + principalId: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("Description of role assignment") + description?: string; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently the only accepted value is '2.0'") + conditionVersion?: string; + + @doc("Time it was created") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Time it was updated") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedOn?: utcDateTime; + + @doc("Id of the user who created the assignment") + @visibility("read") + createdBy?: string; + + @doc("Id of the user who updated the assignment") + @visibility("read") + updatedBy?: string; + + @doc("Id of the delegated managed identity resource") + delegatedManagedIdentityResourceId?: string; +} + +@doc("Role assignment create parameters.") +model RoleAssignmentCreateParameters { + @doc("Role assignment properties.") + properties: RoleAssignmentProperties; +} + +@doc("Permissions information.") +model PermissionGetResult is Azure.Core.Page; + +@doc("Role definition permissions.") +model Permission { + @doc("Allowed actions.") + actions?: string[]; + + @doc("Denied actions.") + notActions?: string[]; + + @doc("Allowed Data actions.") + dataActions?: string[]; + + @doc("Denied Data actions.") + notDataActions?: string[]; +} + +@doc("Role definition properties.") +model RoleDefinitionProperties { + @doc("The role name.") + roleName?: string; + + @doc("The role definition description.") + description?: string; + + @doc("The role type.") + @projectedName("json", "type") + roleType?: RoleType; + + @doc("Role definition permissions.") + permissions?: Permission[]; + + @doc("Role definition assignable scopes.") + assignableScopes?: string[]; +} + +@doc("Eligible child resources list operation result.") +model EligibleChildResourcesListResult + is Azure.Core.Page; + +@doc("Eligible child resource") +model EligibleChildResource { + @doc("The resource scope Id.") + @visibility("read") + id?: string; + + @doc("The resource name.") + @visibility("read") + name?: string; + + @doc("The resource type.") + @visibility("read") + type?: string; +} + +@doc("An error response from the service.") +@error +model CloudError { + @doc("An error response from the service.") + error?: CloudErrorBody; +} + +@doc("An error response from the service.") +model CloudErrorBody { + @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + code?: string; + + @doc("A message describing the error, intended to be suitable for display in a user interface.") + message?: string; +} + +@doc("Role assignment schedule properties with scope.") +model RoleAssignmentScheduleProperties { + @doc("The role assignment schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("The id of roleAssignmentScheduleRequest used to create this roleAssignmentSchedule") + roleAssignmentScheduleRequestId?: string; + + @doc("The id of roleEligibilitySchedule used to activated this roleAssignmentSchedule") + linkedRoleEligibilityScheduleId?: string; + + @doc("Assignment type of the role assignment schedule") + assignmentType?: AssignmentType; + + @doc("Membership type of the role assignment schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The status of the role assignment schedule.") + status?: RoleManagementScheduleStatus; + + @doc("Start DateTime when role assignment schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("End DateTime when role assignment schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role assignment schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("DateTime when role assignment schedule was modified") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +model ExpandedProperties { + @doc("Details of the resource scope") + scope?: ExpandedPropertiesScope; + + @doc("Details of role definition") + roleDefinition?: ExpandedPropertiesRoleDefinition; + + @doc("Details of the principal") + principal?: ExpandedPropertiesPrincipal; +} + +@doc("Details of the resource scope") +model ExpandedPropertiesScope { + @doc("Scope id of the resource") + @projectedName("json", "id") + scopeId?: string; + + @doc("Display name of the resource") + @projectedName("json", "displayName") + scopeDisplayName?: string; + + @doc("Type of the scope.") + @projectedName("json", "type") + scopeType?: ScopeType; +} + +@doc("Details of role definition") +model ExpandedPropertiesRoleDefinition { + @doc("Id of the role definition") + @projectedName("json", "id") + roleDefinitionId?: string; + + @doc("Display name of the role definition") + @projectedName("json", "displayName") + roleDefinitionDisplayName?: string; + + @doc("The role type.") + @projectedName("json", "type") + roleType?: RoleType; +} + +@doc("Details of the principal") +model ExpandedPropertiesPrincipal { + @doc("Id of the principal") + @projectedName("json", "id") + principalId?: string; + + @doc("Display name of the principal") + @projectedName("json", "displayName") + principalDisplayName?: string; + + @doc("Email id of the principal") + email?: string; + + @doc("Type of the principal.") + @projectedName("json", "type") + principalType?: PrincipalType; +} + +@doc("Role assignment schedule properties with scope.") +model RoleAssignmentScheduleInstanceProperties { + @doc("The role assignment schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("Id of the master role assignment schedule") + roleAssignmentScheduleId?: string; + + @doc("Role Assignment Id in external system") + originRoleAssignmentId?: string; + + @doc("The status of the role assignment schedule instance.") + status?: RoleManagementScheduleStatus; + + @doc("The startDateTime of the role assignment schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("The endDateTime of the role assignment schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("roleEligibilityScheduleId used to activate") + linkedRoleEligibilityScheduleId?: string; + + @doc("roleEligibilityScheduleInstanceId linked to this roleAssignmentScheduleInstance") + linkedRoleEligibilityScheduleInstanceId?: string; + + @doc("Assignment type of the role assignment schedule") + assignmentType?: AssignmentType; + + @doc("Membership type of the role assignment schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role assignment schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +@doc("Role assignment schedule request properties with scope.") +model RoleAssignmentScheduleRequestProperties { + @doc("The role assignment schedule request scope.") + @visibility("read") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId: string; + + @doc("The principal ID.") + principalId: string; + + @doc("The principal type of the assigned principal ID.") + @visibility("read") + principalType?: PrincipalType; + + @doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") + requestType: RoleManagementScheduleRequestType; + + @doc("The status of the role assignment schedule request.") + @visibility("read") + status?: RoleManagementScheduleStatus; + + @doc("The approvalId of the role assignment schedule request.") + @visibility("read") + approvalId?: string; + + @doc("The resultant role assignment schedule id or the role assignment schedule id being updated") + targetRoleAssignmentScheduleId?: string; + + @doc("The role assignment schedule instance id being updated") + targetRoleAssignmentScheduleInstanceId?: string; + + @doc("Schedule info of the role assignment schedule") + scheduleInfo?: RoleAssignmentScheduleRequestPropertiesScheduleInfo; + + @doc("The linked role eligibility schedule id - to activate an eligibility.") + linkedRoleEligibilityScheduleId?: string; + + @doc("Justification for the role assignment") + justification?: string; + + @doc("Ticket Info of the role assignment") + ticketInfo?: RoleAssignmentScheduleRequestPropertiesTicketInfo; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role assignment schedule request was created") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Id of the user who created this request") + @visibility("read") + requestorId?: string; + + @doc("Additional properties of principal, scope and role definition") + @visibility("read") + expandedProperties?: ExpandedProperties; +} + +@doc("Schedule info of the role assignment schedule") +model RoleAssignmentScheduleRequestPropertiesScheduleInfo { + @doc("Start DateTime of the role assignment schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Expiration of the role assignment schedule") + expiration?: RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration; +} + +@doc("Expiration of the role assignment schedule") +model RoleAssignmentScheduleRequestPropertiesScheduleInfoExpiration { + @doc("Type of the role assignment schedule expiration") + @projectedName("json", "type") + expirationType?: RoleManagementScheduleExpirationType; + + @doc("End DateTime of the role assignment schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("Duration of the role assignment schedule in TimeSpan.") + duration?: duration; +} + +@doc("Ticket Info of the role assignment") +model RoleAssignmentScheduleRequestPropertiesTicketInfo { + @doc("Ticket number for the role assignment") + ticketNumber?: string; + + @doc("Ticket system name for the role assignment") + ticketSystem?: string; +} + +@doc("Role eligibility schedule properties with scope.") +model RoleEligibilityScheduleProperties { + @doc("The role eligibility schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("The id of roleEligibilityScheduleRequest used to create this roleAssignmentSchedule") + roleEligibilityScheduleRequestId?: string; + + @doc("Membership type of the role eligibility schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The status of the role eligibility schedule.") + status?: RoleManagementScheduleStatus; + + @doc("Start DateTime when role eligibility schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("End DateTime when role eligibility schedule") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role eligibility schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("DateTime when role eligibility schedule was modified") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + updatedOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +@doc("Role eligibility schedule properties with scope.") +model RoleEligibilityScheduleInstanceProperties { + @doc("The role eligibility schedule scope.") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId?: string; + + @doc("The principal ID.") + principalId?: string; + + @doc("The principal type of the assigned principal ID.") + principalType?: PrincipalType; + + @doc("Id of the master role eligibility schedule") + roleEligibilityScheduleId?: string; + + @doc("The status of the role eligibility schedule instance") + status?: RoleManagementScheduleStatus; + + @doc("The startDateTime of the role eligibility schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("The endDateTime of the role eligibility schedule instance") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("Membership type of the role eligibility schedule") + memberType?: RoleManagementScheduleMemberType; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role eligibility schedule was created") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Additional properties of principal, scope and role definition") + expandedProperties?: ExpandedProperties; +} + +@doc("Role eligibility schedule request properties with scope.") +model RoleEligibilityScheduleRequestProperties { + @doc("The role eligibility schedule request scope.") + @visibility("read") + scope?: string; + + @doc("The role definition ID.") + roleDefinitionId: string; + + @doc("The principal ID.") + principalId: string; + + @doc("The principal type of the assigned principal ID.") + @visibility("read") + principalType?: PrincipalType; + + @doc("The type of the role assignment schedule request. Eg: SelfActivate, AdminAssign etc") + requestType: RoleManagementScheduleRequestType; + + @doc("The status of the role eligibility schedule request.") + @visibility("read") + status?: RoleManagementScheduleStatus; + + @doc("The approvalId of the role eligibility schedule request.") + @visibility("read") + approvalId?: string; + + @doc("Schedule info of the role eligibility schedule") + scheduleInfo?: RoleEligibilityScheduleRequestPropertiesScheduleInfo; + + @doc("The resultant role eligibility schedule id or the role eligibility schedule id being updated") + targetRoleEligibilityScheduleId?: string; + + @doc("The role eligibility schedule instance id being updated") + targetRoleEligibilityScheduleInstanceId?: string; + + @doc("Justification for the role eligibility") + justification?: string; + + @doc("Ticket Info of the role eligibility") + ticketInfo?: RoleEligibilityScheduleRequestPropertiesTicketInfo; + + @doc("The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase 'foo_storage_container'") + condition?: string; + + @doc("Version of the condition. Currently accepted value is '2.0'") + conditionVersion?: string; + + @doc("DateTime when role eligibility schedule request was created") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("Id of the user who created this request") + @visibility("read") + requestorId?: string; + + @doc("Additional properties of principal, scope and role definition") + @visibility("read") + expandedProperties?: ExpandedProperties; +} + +@doc("Schedule info of the role eligibility schedule") +model RoleEligibilityScheduleRequestPropertiesScheduleInfo { + @doc("Start DateTime of the role eligibility schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; + + @doc("Expiration of the role eligibility schedule") + expiration?: RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration; +} + +@doc("Expiration of the role eligibility schedule") +model RoleEligibilityScheduleRequestPropertiesScheduleInfoExpiration { + @doc("Type of the role eligibility schedule expiration") + @projectedName("json", "type") + expirationType?: RoleManagementScheduleExpirationType; + + @doc("End DateTime of the role eligibility schedule.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("Duration of the role eligibility schedule in TimeSpan.") + duration?: duration; +} + +@doc("Ticket Info of the role eligibility") +model RoleEligibilityScheduleRequestPropertiesTicketInfo { + @doc("Ticket number for the role eligibility") + ticketNumber?: string; + + @doc("Ticket system name for the role eligibility") + ticketSystem?: string; +} + +@doc("Role management policy properties with scope.") +model RoleManagementPolicyProperties { + @doc("The role management policy scope.") + scope?: string; + + @doc("The role management policy display name.") + displayName?: string; + + @doc("The role management policy description.") + description?: string; + + @doc("The role management policy is default policy.") + isOrganizationDefault?: boolean; + + @doc("The name of the entity last modified it") + @visibility("read") + lastModifiedBy?: Principal; + + @doc("The last modified date time.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; + + @doc("The rule applied to the policy.") + rules?: RoleManagementPolicyRule[]; + + @doc("The readonly computed rule applied to the policy.") + @visibility("read") + effectiveRules?: RoleManagementPolicyRule[]; + + @doc("Additional properties of scope") + @visibility("read") + policyProperties?: PolicyProperties; +} + +@doc("The role management policy rule.") +@discriminator("ruleType") +model RoleManagementPolicyRule { + @doc("The id of the rule.") + id?: string; + + @doc("The target of the current rule.") + target?: RoleManagementPolicyRuleTarget; +} + +@doc("The role management policy rule target.") +model RoleManagementPolicyRuleTarget { + @doc("The caller of the setting.") + caller?: string; + + @doc("The type of operation.") + operations?: string[]; + + @doc("The assignment level to which rule is applied.") + level?: RoleManagementAssignmentLevel; + + @doc("The list of target objects.") + targetObjects?: string[]; + + @doc("The list of inheritable settings.") + inheritableSettings?: string[]; + + @doc("The list of enforced settings.") + enforcedSettings?: string[]; +} + +@doc("Expanded info of resource scope") +model PolicyProperties { + @doc("Details of the resource scope") + @visibility("read") + scope?: PolicyPropertiesScope; +} + +@doc("Details of the resource scope") +model PolicyPropertiesScope { + @doc("Scope id of the resource") + @projectedName("json", "id") + scopeId?: string; + + @doc("Display name of the resource") + @projectedName("json", "displayName") + scopeDisplayName?: string; + + @doc("Type of the scope.") + @projectedName("json", "type") + scopeType?: ScopeType; +} + +@doc("Role management policy assignment properties with scope.") +model RoleManagementPolicyAssignmentProperties { + @doc("The role management policy scope.") + scope?: string; + + @doc("The role definition of management policy assignment.") + roleDefinitionId?: string; + + @doc("The policy id role management policy assignment.") + policyId?: string; + + @doc("The readonly computed rule applied to the policy.") + @visibility("read") + effectiveRules?: RoleManagementPolicyRule[]; + + @doc("Additional properties of scope, role definition and policy") + @visibility("read") + policyAssignmentProperties?: PolicyAssignmentProperties; +} + +@doc("Expanded info of resource scope, role definition and policy") +model PolicyAssignmentProperties { + @doc("Details of the resource scope") + scope?: PolicyAssignmentPropertiesScope; + + @doc("Details of role definition") + roleDefinition?: PolicyAssignmentPropertiesRoleDefinition; + + @doc("Details of the policy") + policy?: PolicyAssignmentPropertiesPolicy; +} + +@doc("Details of the resource scope") +model PolicyAssignmentPropertiesScope { + @doc("Scope id of the resource") + @projectedName("json", "id") + scopeId?: string; + + @doc("Display name of the resource") + @projectedName("json", "displayName") + scopeDisplayName?: string; + + @doc("Type of the scope.") + @projectedName("json", "type") + scopeType?: ScopeType; +} + +@doc("Details of role definition") +model PolicyAssignmentPropertiesRoleDefinition { + @doc("Id of the role definition") + @projectedName("json", "id") + roleDefinitionId?: string; + + @doc("Display name of the role definition") + @projectedName("json", "displayName") + roleDefinitionDisplayName?: string; + + @doc("The role type.") + @projectedName("json", "type") + roleType?: RoleType; +} + +@doc("Details of the policy") +model PolicyAssignmentPropertiesPolicy { + @doc("Id of the policy") + @projectedName("json", "id") + policyId?: string; + + @doc("The name of the entity last modified it") + @visibility("read") + lastModifiedBy?: Principal; + + @doc("The last modified date time.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + lastModifiedDateTime?: utcDateTime; +} + +@doc("Deny Assignments filter") +model DenyAssignmentFilter { + @doc("Return deny assignment with specified name.") + denyAssignmentName?: string; + + @doc("Return all deny assignments where the specified principal is listed in the principals list of deny assignments.") + principalId?: string; + + @doc("Return all deny assignments where the specified principal is listed either in the principals list or exclude principals list of deny assignments.") + gdprExportPrincipalId?: string; +} + +@doc("Failed validation result details") +model ValidationResponseErrorInfo { + @doc("Error code indicating why validation failed") + @visibility("read") + code?: string; + + @doc("Message indicating why validation failed") + @visibility("read") + message?: string; +} + +@doc("Validation response") +model ValidationResponse { + @doc("Whether or not validation succeeded") + @visibility("read") + isValid?: boolean; + + @doc("Failed validation result details") + errorInfo?: ValidationResponseErrorInfo; +} + +@doc("Role Assignments filter") +model RoleAssignmentFilter { + @doc("Returns role assignment of the specific principal.") + principalId?: string; +} + +@doc("Role Definitions filter") +model RoleDefinitionFilter { + @doc("Returns role definition with the specific name.") + roleName?: string; + + @doc("Returns role definition with the specific type.") + type?: string; +} + +@doc("The role management policy approval rule.") +model RoleManagementPolicyApprovalRule extends RoleManagementPolicyRule { + @doc("The approval setting") + setting?: ApprovalSettings; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyApprovalRule"; +} + +@doc("The approval settings.") +model ApprovalSettings { + @doc("Determines whether approval is required or not.") + isApprovalRequired?: boolean; + + @doc("Determines whether approval is required for assignment extension.") + isApprovalRequiredForExtension?: boolean; + + @doc("Determine whether requestor justification is required.") + isRequestorJustificationRequired?: boolean; + + @doc("The type of rule") + approvalMode?: ApprovalMode; + + @doc("The approval stages of the request.") + approvalStages?: ApprovalStage[]; +} + +@doc("The approval stage.") +model ApprovalStage { + @doc("The time in days when approval request would be timed out") + approvalStageTimeOutInDays?: int32; + + @doc("Determines whether approver need to provide justification for his decision.") + isApproverJustificationRequired?: boolean; + + @doc("The time in minutes when the approval request would be escalated if the primary approver does not approve") + escalationTimeInMinutes?: int32; + + @doc("The primary approver of the request.") + primaryApprovers?: UserSet[]; + + @doc("The value determine whether escalation feature is enabled.") + isEscalationEnabled?: boolean; + + @doc("The escalation approver of the request.") + escalationApprovers?: UserSet[]; +} + +@doc("The detail of a user.") +model UserSet { + @doc("The type of user.") + userType?: UserType; + + @doc("The value indicating whether the user is a backup fallback approver") + isBackup?: boolean; + + @doc("The object id of the user.") + id?: string; + + @doc("The description of the user.") + description?: string; +} + +@doc("The role management policy authentication context rule.") +model RoleManagementPolicyAuthenticationContextRule + extends RoleManagementPolicyRule { + @doc("The value indicating if rule is enabled.") + isEnabled?: boolean; + + @doc("The claim value.") + claimValue?: string; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyAuthenticationContextRule"; +} + +@doc("The role management policy enablement rule.") +model RoleManagementPolicyEnablementRule extends RoleManagementPolicyRule { + @doc("The list of enabled rules.") + enabledRules?: EnablementRules[]; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyEnablementRule"; +} + +@doc("The role management policy expiration rule.") +model RoleManagementPolicyExpirationRule extends RoleManagementPolicyRule { + @doc("The value indicating whether expiration is required.") + isExpirationRequired?: boolean; + + @doc("The maximum duration of expiration in timespan.") + maximumDuration?: duration; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyExpirationRule"; +} + +@doc("The role management policy notification rule.") +model RoleManagementPolicyNotificationRule extends RoleManagementPolicyRule { + @doc("The type of notification.") + notificationType?: NotificationDeliveryMechanism; + + @doc("The notification level.") + notificationLevel?: NotificationLevel; + + @doc("The recipient type.") + recipientType?: RecipientType; + + @doc("The list of notification recipients.") + notificationRecipients?: string[]; + + @doc("Determines if the notification will be sent to the recipient type specified in the policy rule.") + isDefaultRecipientsEnabled?: boolean; + + @doc("The type of rule") + ruleType: "RoleManagementPolicyNotificationRule"; +} + +@doc("Role assignment schedule filter") +model RoleAssignmentScheduleFilter { + @doc("Returns role assignment schedule of the specific principal.") + principalId?: string; + + @doc("Returns role assignment schedule of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role assignment schedule instances of the specific status.") + status?: string; +} + +@doc("Role assignment schedule instance filter") +model RoleAssignmentScheduleInstanceFilter { + @doc("Returns role assignment schedule instances of the specific principal.") + principalId?: string; + + @doc("Returns role assignment schedule instances of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role assignment schedule instances of the specific status.") + status?: string; + + @doc("Returns role assignment schedule instances belonging to a specific role assignment schedule.") + roleAssignmentScheduleId?: string; +} + +@doc("Role assignment schedule request filter") +model RoleAssignmentScheduleRequestFilter { + @doc("Returns role assignment requests of the specific principal.") + principalId?: string; + + @doc("Returns role assignment requests of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role assignment requests created by specific principal.") + requestorId?: string; + + @doc("Returns role assignment requests of specific status.") + status?: string; +} + +@doc("Role eligibility schedule filter") +model RoleEligibilityScheduleFilter { + @doc("Returns role eligibility schedule of the specific principal.") + principalId?: string; + + @doc("Returns role eligibility schedule of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role eligibility schedule of the specific status.") + status?: string; +} + +@doc("Role eligibility schedule instance filter") +model RoleEligibilityScheduleInstanceFilter { + @doc("Returns role eligibility schedule instances of the specific principal.") + principalId?: string; + + @doc("Returns role eligibility schedule instances of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role eligibility schedule instances of the specific status.") + status?: string; + + @doc("Returns role eligibility schedule instances belonging to a specific role eligibility schedule.") + roleEligibilityScheduleId?: string; +} + +@doc("Role eligibility schedule request filter") +model RoleEligibilityScheduleRequestFilter { + @doc("Returns role eligibility requests of the specific principal.") + principalId?: string; + + @doc("Returns role eligibility requests of the specific role definition.") + roleDefinitionId?: string; + + @doc("Returns role eligibility requests created by specific principal.") + requestorId?: string; + + @doc("Returns role eligibility requests of specific status.") + status?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp new file mode 100644 index 0000000000..c62bc2b413 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/routes.tsp @@ -0,0 +1,108 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Authorization; + +interface ClassicAdministratorsOperations { + @doc("Gets service administrator, account administrator, and co-administrators for the subscription.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/classicAdministrators") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + ClassicAdministratorListResult + >; +} + +interface GlobalAdministratorOperations { + @doc("Elevates access for a Global Administrator.") + @route("/providers/Microsoft.Authorization/elevateAccess") + @post + ElevateAccess is Azure.Core.Foundations.Operation<{}, void>; +} + +interface AzurePermissionsForResourceGroupOperations { + @doc("Gets all permissions the caller has for a resource group.") + @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Authorization/permissions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + PermissionGetResult + >; +} + +interface AzurePermissionsForResourceOperations { + @doc("Gets all permissions the caller has for a resource.") + @route("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/permissions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("The namespace of the resource provider.") + @path + resourceProviderNamespace: string; + + @doc("The parent resource identity.") + @path + parentResourcePath: string; + + @doc("The resource type of the resource.") + @path + resourceType: string; + + @doc("The name of the resource to get the permissions for.") + @path + resourceName: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + PermissionGetResult + >; +} + +interface EligibleChildResourcesOperations { + @doc("Get the child resources of a resource on which user has eligible access") + @route("/{scope}/providers/Microsoft.Authorization/eligibleChildResources") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The scope of the role management policy.") + @path + scope: string; + + @doc("The filter to apply on the operation. Use $filter=resourceType+eq+'Subscription' to filter on only resource of type = 'Subscription'. Use $filter=resourceType+eq+'subscription'+or+resourceType+eq+'resourcegroup' to filter on resource of type = 'Subscription' or 'ResourceGroup'") + @query("$filter") + $filter?: string; + }, + EligibleChildResourcesListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-authorization/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp index be045c6865..62b77c46e7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Application.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Space.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("An integration application under space.") @@ -25,12 +27,16 @@ model Application is TrackedResource { interface Applications { @doc("Get a Application") get is ArmResourceRead; + @doc("Create a Application") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Application") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Delete a Application") delete is ArmResourceDeleteSync; + @doc("List Application resources by Space") listBySpace is ArmResourceListByParent< Application, @@ -75,30 +81,35 @@ interface Applications { orderby?: string[]; } >; + @doc("The delete business process development artifact action.") deleteBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, GetOrDeleteBusinessProcessDevelopmentArtifactRequest, void >; + @doc("The get business process development artifact action.") getBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, GetOrDeleteBusinessProcessDevelopmentArtifactRequest, SaveOrGetBusinessProcessDevelopmentArtifactResponse >; + @doc("The list business process development artifacts action.") listBusinessProcessDevelopmentArtifacts is ArmResourceActionSync< Application, void, ListBusinessProcessDevelopmentArtifactsResponse >; + @doc("The save business process development artifact action.") saveBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, SaveOrValidateBusinessProcessDevelopmentArtifactRequest, SaveOrGetBusinessProcessDevelopmentArtifactResponse >; + @doc("The validate business process development artifact action.") validateBusinessProcessDevelopmentArtifact is ArmResourceActionSync< Application, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp index ffa0eae773..aa6e302b82 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcess.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Application.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("A business process under application.") @@ -25,12 +27,16 @@ model BusinessProcess is ProxyResource { interface BusinessProcesses { @doc("Get a BusinessProcess") get is ArmResourceRead; + @doc("Create a BusinessProcess") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a BusinessProcess") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Delete a BusinessProcess") delete is ArmResourceDeleteSync; + @doc("List BusinessProcess resources by Application") listByApplication is ArmResourceListByParent< BusinessProcess, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp index d741ea02d4..3320b7f04a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/BusinessProcessVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./BusinessProcess.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("A business process version.") @@ -24,6 +26,7 @@ model BusinessProcessVersion is ProxyResource { interface BusinessProcessVersions { @doc("Get a BusinessProcessVersion") get is ArmResourceRead; + @doc("List BusinessProcessVersion resources by BusinessProcess") listByBusinessProcess is ArmResourceListByParent< BusinessProcessVersion, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp index 13a2545d77..aff8a3d809 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/InfrastructureResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Space.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("An infrastructure resource under Space.") @@ -26,15 +28,19 @@ model InfrastructureResource interface InfrastructureResources { @doc("Get a InfrastructureResource") get is ArmResourceRead; + @doc("Create a InfrastructureResource") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a InfrastructureResource") - patch is ArmResourcePatchSync< + patch is ArmCustomPatchSync< InfrastructureResource, - InfrastructureResourceProperties + InfrastructureResourceUpdate >; + @doc("Delete a InfrastructureResource") delete is ArmResourceDeleteSync; + @doc("List InfrastructureResource resources by Space") listBySpace is ArmResourceListByParent< InfrastructureResource, diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp index 910f878013..a18dead222 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/Space.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.IntegrationSpaces; @doc("An integration space.") @@ -23,12 +25,16 @@ model Space is TrackedResource { interface Spaces { @doc("Get a Space") get is ArmResourceRead; + @doc("Create a Space") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update a Space") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Delete a Space") delete is ArmResourceDeleteSync; + @doc("List Space resources by resource group") listByResourceGroup is ArmResourceListByParent< Space, @@ -73,6 +79,7 @@ interface Spaces { orderby?: string[]; } >; + @doc("List Space resources by subscription ID") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json new file mode 100644 index 0000000000..eaac39c532 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_CreateOrUpdate.json @@ -0,0 +1,94 @@ +{ + "operationId": "Applications_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resource": { + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + }, + "dataStoreName2": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateApplication", + "responses": { + "200": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + }, + "dataStoreName2": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + }, + "201": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + }, + "dataStoreName2": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json new file mode 100644 index 0000000000..ac1086f2ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Delete.json @@ -0,0 +1,15 @@ +{ + "operationId": "Applications_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteApplication", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..4b2e38e9de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_DeleteBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,17 @@ +{ + "operationId": "Applications_DeleteBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1" + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteBusinessProcessDevelopmentArtifact", + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json new file mode 100644 index 0000000000..7dd237fb65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Get.json @@ -0,0 +1,36 @@ +{ + "operationId": "Applications_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetApplication", + "responses": { + "200": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..78ca3875cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_GetBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,175 @@ +{ + "operationId": "Applications_GetBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1" + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetBusinessProcessDevelopmentArtifact", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + }, + "systemData": { + "lastModifiedAt": "2023-09-06T22:53:01.8497279Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json new file mode 100644 index 0000000000..7a1704bbcb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBusinessProcessDevelopmentArtifacts.json @@ -0,0 +1,176 @@ +{ + "operationId": "Applications_ListBusinessProcessDevelopmentArtifacts", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListBusinessProcessDevelopmentArtifacts", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + }, + "systemData": { + "lastModifiedAt": "2023-09-06T22:53:01.8497279Z" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json new file mode 100644 index 0000000000..e8bb2c2726 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ListBySpace.json @@ -0,0 +1,39 @@ +{ + "operationId": "Applications_ListBySpace", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListApplicationsBySpace", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json new file mode 100644 index 0000000000..ef552ed1c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_Patch.json @@ -0,0 +1,44 @@ +{ + "operationId": "Applications_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "properties": { + "properties": { + "description": "This is the user provided PATCHED description of the application." + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchApplication", + "responses": { + "200": { + "body": { + "name": "Application1", + "type": "Microsoft.IntegrationSpaces/spaces/applications", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided PATCHED description of the application.", + "provisioningState": "Succeeded", + "trackingDataStores": { + "dataStoreName1": { + "dataStoreIngestionUri": "https://ingest-someClusterName.someRegionName.kusto.windows.net", + "dataStoreResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Kusto/Clusters/cluster1", + "dataStoreUri": "https://someClusterName.someRegionName.kusto.windows.net", + "databaseName": "testDatabase1" + } + } + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..68888f79d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_SaveBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,326 @@ +{ + "operationId": "Applications_SaveBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "SaveBusinessProcessDevelopmentArtifact", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + }, + "systemData": { + "lastModifiedAt": "2023-09-06T22:53:01.8497279Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json new file mode 100644 index 0000000000..a792e1bdc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Applications_ValidateBusinessProcessDevelopmentArtifact.json @@ -0,0 +1,176 @@ +{ + "operationId": "Applications_ValidateBusinessProcessDevelopmentArtifact", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "body": { + "name": "BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received@": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "trackingProfiles": { + "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1": { + "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2023-01-01/trackingdefinitionschema.json#", + "businessProcess": { + "name": "businessProcess1", + "version": "d52c9c91-6e10-4a90-9c1f-08ee5d01c656" + }, + "trackingDefinitions": { + "Fulfillment": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Completed": { + "operationName": "CompletedPO", + "operationType": "Action", + "properties": {} + }, + "Denied": { + "operationName": "DeniedPO", + "operationType": "Action", + "properties": {} + }, + "Shipped": { + "operationName": "ShippedPO", + "operationType": "Action", + "properties": { + "ShipPriority": "@action().inputs.shipPriority", + "TrackingID": "@action().inputs.trackingID" + } + } + } + }, + "PurchaseOrder": { + "correlationContext": { + "operationName": "manual", + "operationType": "Trigger", + "propertyName": "OrderNumber", + "value": "@trigger().outputs.body.OrderNumber" + }, + "events": { + "Processing": { + "operationName": "ApprovedPO", + "operationType": "Action", + "properties": { + "ApprovalStatus": "@action().inputs.ApprovalStatus", + "ApproverName": "@action().inputs.ApproverName", + "POAmount": "@action().inputs.POamount" + } + }, + "Received": { + "operationName": "manual", + "operationType": "Trigger", + "properties": { + "City": "@trigger().outputs.body.Address.City", + "Product": "@trigger().outputs.body.Product", + "Quantity": "@trigger().outputs.body.Quantity", + "State": "@trigger().outputs.body.Address.State" + } + } + } + } + } + } + } + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ValidateBusinessProcessDevelopmentArtifact", + "responses": { + "200": {}, + "default": { + "body": { + "error": { + "code": "InvalidCreateBusinessProcessResourceRequest", + "message": "The body for the request to create a business process isn't valid. The business process stage named 'Received@' contains these invalid characters: (@). The name can use only letters, digits and these characters : (\"-\", \"_\", \".\")" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json new file mode 100644 index 0000000000..32bcac7f27 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_Get.json @@ -0,0 +1,109 @@ +{ + "operationId": "BusinessProcessVersions_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "businessProcessVersion": "08585074782265427079", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetBusinessProcessVersion", + "responses": { + "200": { + "body": { + "name": "08585074782265427079", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1/versions/08585074782265427079", + "properties": { + "description": "Sample Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json new file mode 100644 index 0000000000..1c952a2d43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcessVersions_ListByBusinessProcess.json @@ -0,0 +1,112 @@ +{ + "operationId": "BusinessProcessVersions_ListByBusinessProcess", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListBusinessProcessVersionsByBusinessProcess", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "08585074782265427079", + "type": "Microsoft.IntegrationSpaces/spaces/applications/BusinessProcesses/versions", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1/versions/08585074782265427079", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json new file mode 100644 index 0000000000..f0ae9e2237 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_CreateOrUpdate.json @@ -0,0 +1,289 @@ +{ + "operationId": "BusinessProcesses_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resource": { + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateBusinessProcess", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/BusinessProcesses/BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + }, + "201": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/BusinessProcesses/BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json new file mode 100644 index 0000000000..c50f88d147 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Delete.json @@ -0,0 +1,16 @@ +{ + "operationId": "BusinessProcesses_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteBusinessProcess", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json new file mode 100644 index 0000000000..4248244f5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Get.json @@ -0,0 +1,108 @@ +{ + "operationId": "BusinessProcesses_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetBusinessProcess", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1", + "properties": { + "description": "Sample Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json new file mode 100644 index 0000000000..ac94165247 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_ListByApplication.json @@ -0,0 +1,111 @@ +{ + "operationId": "BusinessProcesses_ListByApplication", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListBusinessProcessesByApplication", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/BusinessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1", + "properties": { + "description": "First Business Process", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427079" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json new file mode 100644 index 0000000000..93782ba625 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/BusinessProcesses_Patch.json @@ -0,0 +1,113 @@ +{ + "operationId": "BusinessProcesses_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "applicationName": "Application1", + "businessProcessName": "BusinessProcess1", + "properties": { + "properties": { + "description": "First updated business process." + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchBusinessProcess", + "responses": { + "200": { + "body": { + "name": "BusinessProcess1", + "type": "Microsoft.IntegrationSpaces/spaces/applications/businessProcesses", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/applications/Application1/businessProcesses/BusinessProcess1", + "properties": { + "description": "First updated business process.", + "businessProcessMapping": { + "Completed": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "CompletedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Denied": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "DeniedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + }, + "Processing": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ApprovedPO", + "operationType": "Action", + "workflowName": "PurchaseOrder" + }, + "Received": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "manual", + "operationType": "Trigger", + "workflowName": "PurchaseOrder" + }, + "Shipped": { + "logicAppResourceId": "subscriptions/sub1/resourcegroups/group1/providers/Microsoft.Web/sites/logicApp1", + "operationName": "ShippedPO", + "operationType": "Action", + "workflowName": "Fulfillment" + } + }, + "businessProcessStages": { + "Completed": { + "description": "Completed", + "stagesBefore": [ + "Shipped" + ] + }, + "Denied": { + "description": "Denied", + "stagesBefore": [ + "Processing" + ] + }, + "Processing": { + "description": "Processing", + "properties": { + "ApprovalState": "String", + "ApproverName": "String", + "POAmount": "Integer" + }, + "stagesBefore": [ + "Received" + ] + }, + "Received": { + "description": "received", + "properties": { + "City": "String", + "Product": "String", + "Quantity": "Integer", + "State": "String" + } + }, + "Shipped": { + "description": "Shipped", + "properties": { + "ShipPriority": "Integer", + "TrackingID": "Integer" + }, + "stagesBefore": [ + "Denied" + ] + } + }, + "identifier": { + "propertyName": "businessIdentifier-1", + "propertyType": "String" + }, + "provisioningState": "Succeeded", + "tableName": "table1", + "trackingDataStoreReferenceName": "trackingDataStoreReferenceName1", + "version": "08585074782265427080" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json new file mode 100644 index 0000000000..044f0bacf9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_CreateOrUpdate.json @@ -0,0 +1,43 @@ +{ + "operationId": "InfrastructureResources_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "resource": { + "properties": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateInfrastructureResource", + "responses": { + "200": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + }, + "201": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json new file mode 100644 index 0000000000..213cea675a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Delete.json @@ -0,0 +1,15 @@ +{ + "operationId": "InfrastructureResources_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteInfrastructureResource", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json new file mode 100644 index 0000000000..3f7c76e696 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Get.json @@ -0,0 +1,25 @@ +{ + "operationId": "InfrastructureResources_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetInfrastructureResource", + "responses": { + "200": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json new file mode 100644 index 0000000000..74a8b5ccd3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_ListBySpace.json @@ -0,0 +1,28 @@ +{ + "operationId": "InfrastructureResources_ListBySpace", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListInfrastructureResourcesBySpace", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json new file mode 100644 index 0000000000..0fa6a498d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/InfrastructureResources_Patch.json @@ -0,0 +1,31 @@ +{ + "operationId": "InfrastructureResources_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "infrastructureResourceName": "InfrastructureResource1", + "properties": { + "properties": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchInfrastructureResource", + "responses": { + "200": { + "body": { + "name": "InfrastructureResource1", + "type": "Microsoft.IntegrationSpaces/spaces/infrastructureresources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1/infrastructureResources/InfrastructureResource1", + "properties": { + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.ApiManagement/service/APIM1", + "resourceType": "Microsoft.ApiManagement/service" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json new file mode 100644 index 0000000000..4576952d5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "operationId": "Spaces_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-14-preview", + "resource": { + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource." + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "CreateOrUpdateSpace", + "responses": { + "200": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + }, + "201": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json new file mode 100644 index 0000000000..5c0bb6b099 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Delete.json @@ -0,0 +1,14 @@ +{ + "operationId": "Spaces_Delete", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeleteSpace", + "responses": { + "200": {}, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json new file mode 100644 index 0000000000..517e6cb4b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Get.json @@ -0,0 +1,27 @@ +{ + "operationId": "Spaces_Get", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "GetSpace", + "responses": { + "200": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json new file mode 100644 index 0000000000..bf7501878e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "operationId": "Spaces_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListSpacesByResourceGroup", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json new file mode 100644 index 0000000000..20cef33f5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_ListBySubscription.json @@ -0,0 +1,30 @@ +{ + "operationId": "Spaces_ListBySubscription", + "parameters": { + "api-version": "2023-11-14-preview", + "resourceGroupName": "testrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "ListSpacesBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json new file mode 100644 index 0000000000..f1fda413d7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/examples/2023-11-14-preview/Spaces_Patch.json @@ -0,0 +1,35 @@ +{ + "operationId": "Spaces_Patch", + "parameters": { + "api-version": "2023-11-14-preview", + "properties": { + "properties": { + "description": "This is the user provided description of the space resource." + }, + "tags": { + "key1": "Value1" + } + }, + "resourceGroupName": "testrg", + "spaceName": "Space1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "PatchSpace", + "responses": { + "200": { + "body": { + "name": "Space1", + "type": "Microsoft.IntegrationSpaces/spaces", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.IntegrationSpaces/spaces/Space1", + "location": "CentralUS", + "properties": { + "description": "This is the user provided description of the space resource.", + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "Value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp index 84136e5399..427fd6b8b4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/main.tsp @@ -29,5 +29,6 @@ namespace Microsoft.IntegrationSpaces; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-11-14-preview API version.") v2023_11_14_preview: "2023-11-14-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp index 98612ec7e7..51b5b1d320 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/models.tsp @@ -6,21 +6,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.IntegrationSpaces; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The status of the current operation.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -31,6 +35,7 @@ enum ProvisioningState { Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -48,6 +53,40 @@ model SpaceResourceProperties { description?: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Space.") +model SpaceUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Space.") + properties?: SpaceUpdateProperties; +} + +@doc("The updatable properties of the Space.") +model SpaceUpdateProperties { + @doc("The description of the resource.") + description?: string; +} + @doc("The properties of application.") model ApplicationProperties { @doc("The status of the last operation.") @@ -76,6 +115,24 @@ model TrackingDataStore { dataStoreIngestionUri: string; } +@doc("The type used for update operations of the Application.") +model ApplicationUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Application.") + properties?: ApplicationUpdateProperties; +} + +@doc("The updatable properties of the Application.") +model ApplicationUpdateProperties { + @doc("The description of the resource.") + description?: string; + + @doc("The tracking data stores.") + trackingDataStores?: Record; +} + @doc("The properties of business process.") model BusinessProcessProperties { @doc("The status of the last operation.") @@ -141,6 +198,33 @@ model BusinessProcessMappingItem { operationType?: string; } +@doc("The type used for update operations of the BusinessProcess.") +model BusinessProcessUpdate { + @doc("The updatable properties of the BusinessProcess.") + properties?: BusinessProcessUpdateProperties; +} + +@doc("The updatable properties of the BusinessProcess.") +model BusinessProcessUpdateProperties { + @doc("The description of the business process.") + description?: string; + + @doc("The table name of the business process.") + tableName?: string; + + @doc("The tracking data store reference name.") + trackingDataStoreReferenceName?: string; + + @doc("The business process identifier.") + identifier?: BusinessProcessIdentifier; + + @doc("The business process stages.") + businessProcessStages?: Record; + + @doc("The business process mapping.") + businessProcessMapping?: Record; +} + @doc("The business process development artifact get or delete request.") model GetOrDeleteBusinessProcessDevelopmentArtifactRequest { @doc("The name of the business process development artifact.") @@ -312,3 +396,18 @@ model InfrastructureResourceProperties { @doc("The id of the infrastructure resource.") resourceId: string; } + +@doc("The type used for update operations of the InfrastructureResource.") +model InfrastructureResourceUpdate { + @doc("The updatable properties of the InfrastructureResource.") + properties?: InfrastructureResourceUpdateProperties; +} + +@doc("The updatable properties of the InfrastructureResource.") +model InfrastructureResourceUpdateProperties { + @doc("The type of the infrastructure resource.") + resourceType?: string; + + @doc("The id of the infrastructure resource.") + resourceId?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp index ffd2fe0b2f..76059d8f12 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-azureintegrationspaces/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Microsoft.IntegrationSpaces; diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp index 23cf9a0b73..eced2fa6e6 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/AvailabilitySet.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to an availability set at creation time. An existing VM cannot be added to an availability set.") @@ -24,17 +26,24 @@ model AvailabilitySet is TrackedResource { interface AvailabilitySets { @doc("Retrieves information about an availability set.") get is ArmResourceRead; + @doc("Create or update an availability set.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update an availability set.") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Delete an availability set.") delete is ArmResourceDeleteSync; + @doc("Lists all availability sets in a resource group.") list is ArmResourceListByParent; + @doc("Lists all availability sets in a subscription.") listBySubscription is ArmListBySubscription; + @doc("Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set.") + // FIXME: AvailabilitySets_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") @get ListAvailableSizes is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp index 126bfc31db..0dc2a99d53 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservation.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CapacityReservationGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the capacity reservation.") @@ -38,15 +40,16 @@ interface CapacityReservations { $expand?: CapacityReservationInstanceViewTypes; } >; + @doc("The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update a capacity reservation.") - update is ArmResourcePatchAsync< - CapacityReservation, - CapacityReservationProperties - >; + update is ArmCustomPatchAsync; + @doc("The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details.") delete is ArmResourceDeleteAsync; + @doc("Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.") listByCapacityReservationGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp index ddda7fc14f..2aa3d4d6eb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CapacityReservationGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.") @@ -35,15 +37,19 @@ interface CapacityReservationGroups { $expand?: CapacityReservationGroupInstanceViewTypes; } >; + @doc("The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.") - update is ArmResourcePatchSync< + update is ArmCustomPatchSync< CapacityReservationGroup, - CapacityReservationGroupProperties + CapacityReservationGroupUpdate >; + @doc("The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.") delete is ArmResourceDeleteSync; + @doc("Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.") listByResourceGroup is ArmResourceListByParent< CapacityReservationGroup, @@ -55,6 +61,7 @@ interface CapacityReservationGroups { $expand?: ExpandTypesForGetCapacityReservationGroups; } >; + @doc("Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp index 1fe05c589a..758b15991e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudService.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes the cloud service.") @@ -25,29 +27,42 @@ model CloudService is TrackedResource { interface CloudServices { @doc("Display information about a cloud service.") get is ArmResourceRead; + @doc("Create or update a cloud service. Please note some properties can be set only during cloud service creation.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a cloud service.") - update is ArmTagsPatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a cloud service.") delete is ArmResourceDeleteAsync; + @doc("Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") list is ArmResourceListByParent; + @doc("Gets a list of all cloud services in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.") listAll is ArmListBySubscription; + @doc("Starts the cloud service.") start is ArmResourceActionAsync; + @doc("Power off the cloud service. Note that resources are still attached and you are getting charged for the resources.") powerOff is ArmResourceActionAsync; + @doc("Restarts one or more role instances in a cloud service.") restart is ArmResourceActionAsync; + @doc("Reimage asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") reimage is ArmResourceActionAsync; + @doc("Rebuild Role Instances reinstalls the operating system on instances of web 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 Instances.") rebuild is ArmResourceActionAsync; + @doc("Deletes role instances in a cloud service.") deleteInstances is ArmResourceActionAsync; + @doc("Gets the status of a cloud service.") + // FIXME: CloudServices_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< @@ -66,11 +81,11 @@ interface CloudServices { }, CloudServiceInstanceView >; -} -@armResourceOperations -interface CloudServicesUpdateDomain { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServicesUpdateDomain_GetUpdateDomain") @doc("Gets the specified update domain of a cloud service. Use nextLink property in the response to get the next page of update domains. Do this till nextLink is null to fetch all the update domains.") + // FIXME: CloudServicesUpdateDomain_GetUpdateDomain could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains/{updateDomain}") @get GetUpdateDomain is Azure.Core.Foundations.Operation< @@ -94,7 +109,10 @@ interface CloudServicesUpdateDomain { UpdateDomain >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServicesUpdateDomain_ListUpdateDomains") @doc("Gets a list of all update domains in a cloud service.") + // FIXME: CloudServicesUpdateDomain_ListUpdateDomains could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/updateDomains") @get ListUpdateDomains is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp index 5cca58c63e..cdb153ef85 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CloudServiceRole.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CloudService.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a role of the cloud service.") @@ -26,6 +28,7 @@ model CloudServiceRole is ProxyResource { interface CloudServiceRoles { @doc("Gets a role from a cloud service.") get is ArmResourceRead; + @doc("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.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp index 2a73c137c4..8c950465b2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGallery.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; // FIXME: CommunityGallery has no properties property diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp index 8aa7d32804..614abe2c11 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CommunityGallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image definition that you want to create or update.") @@ -24,6 +26,7 @@ model CommunityGalleryImage is ProxyResource { interface CommunityGalleryImages { @doc("Get a community gallery image.") get is ArmResourceRead; + @doc("List community gallery images inside a gallery.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp index 03b622c39d..60c8c5aac5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/CommunityGalleryImageVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CommunityGalleryImage.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image version that you want to create or update.") @@ -25,6 +27,7 @@ model CommunityGalleryImageVersion interface CommunityGalleryImageVersions { @doc("Get a community gallery image version.") get is ArmResourceRead; + @doc("List community gallery image versions inside an image.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp index 2f9c0653fe..ad183f83b7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHost.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DedicatedHostGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the Dedicated host.") @@ -35,16 +37,23 @@ interface DedicatedHosts { $expand?: InstanceViewTypes; } >; + @doc("Create or update a dedicated host .") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a dedicated host .") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Delete a dedicated host.") delete is ArmResourceDeleteAsync; + @doc("Lists all of the dedicated hosts in the specified dedicated host group. Use the nextLink property in the response to get the next page of dedicated hosts.") listByHostGroup is ArmResourceListByParent; + @doc("Restart the dedicated host. The operation will complete successfully once the dedicated host has restarted and is running. To determine the health of VMs deployed on the dedicated host after the restart check the Resource Health Center in the Azure Portal. Please refer to https://docs.microsoft.com/azure/service-health/resource-health-overview for more details.") restart is ArmResourceActionAsync; + @doc("Lists all available dedicated host sizes to which the specified dedicated host can be resized. NOTE: The dedicated host sizes provided can be used to only scale up the existing dedicated host.") + // FIXME: DedicatedHosts_ListAvailableSizes could not be converted to a resource operation ListAvailableSizes is Azure.Core.ResourceList; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp index 30ad93a783..b9d38f6c61 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DedicatedHostGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group.") @@ -34,17 +36,19 @@ interface DedicatedHostGroups { $expand?: InstanceViewTypes; } >; + @doc("Create or update a dedicated host group. For details of Dedicated Host and Dedicated Host Groups please see [Dedicated Host Documentation] (https://go.microsoft.com/fwlink/?linkid=2082596)") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Update an dedicated host group.") - update is ArmResourcePatchSync< - DedicatedHostGroup, - DedicatedHostGroupProperties - >; + update is ArmCustomPatchSync; + @doc("Delete a dedicated host group.") delete is ArmResourceDeleteSync; + @doc("Lists all of the dedicated host groups in the specified resource group. Use the nextLink property in the response to get the next page of dedicated host groups.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all of the dedicated host groups in the subscription. Use the nextLink property in the response to get the next page of dedicated host groups.") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp index 682ec78dda..d3291b2345 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Disk.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Disk resource.") @@ -35,18 +37,37 @@ model Disk is TrackedResource { interface Disks { @doc("Gets information about a disk.") get is ArmResourceRead; + @doc("Creates or updates a disk.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a disk.") delete is ArmResourceDeleteAsync; + @doc("Lists all the disks under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disks under a subscription.") list is ArmListBySubscription; + @doc("Grants access to a disk.") - grantAccess is ArmResourceActionAsync; + grantAccess is ArmResourceActionAsync< + Disk, + GrantAccessData, + AccessUri, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Revokes access to a disk.") - revokeAccess is ArmResourceActionAsync; + revokeAccess is ArmResourceActionAsync< + Disk, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp index 1fa6ffbe4f..215784ca71 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskAccess.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("disk access resource.") @@ -25,17 +27,24 @@ model DiskAccess is TrackedResource { interface DiskAccesses { @doc("Gets information about a disk access resource.") get is ArmResourceRead; + @doc("Creates or updates a disk access resource") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk access resource.") - update is ArmTagsPatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a disk access resource.") delete is ArmResourceDeleteAsync; + @doc("Lists all the disk access resources under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disk access resources under a subscription.") list is ArmListBySubscription; + @doc("Gets the private link resources possible under disk access resource") + // FIXME: DiskAccesses_GetPrivateLinkResources could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources") @get GetPrivateLinkResources is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp index e736d83adf..791c3f1679 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskEncryptionSet.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("disk encryption set resource.") @@ -24,16 +26,23 @@ model DiskEncryptionSet is TrackedResource { interface DiskEncryptionSets { @doc("Gets information about a disk encryption set.") get is ArmResourceRead; + @doc("Creates or updates a disk encryption set") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a disk encryption set.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a disk encryption set.") delete is ArmResourceDeleteAsync; + @doc("Lists all the disk encryption sets under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the disk encryption sets under a subscription.") list is ArmListBySubscription; + @doc("Lists all resources that are encrypted with this disk encryption set.") + // FIXME: DiskEncryptionSets_ListAssociatedResources could not be converted to a resource operation ListAssociatedResources is Azure.Core.ResourceList; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp index a5c7eb6252..d9a51575a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/DiskRestorePoint.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./RestorePoint.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Properties of disk restore point") @@ -21,8 +23,10 @@ model DiskRestorePoint is ProxyResource { } @armResourceOperations -interface DiskRestorePoint { +interface DiskRestorePoints { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get disk restorePoint resource") + @operationId("DiskRestorePoint_Get") get is ArmResourceRead< DiskRestorePoint, { @@ -33,7 +37,10 @@ interface DiskRestorePoint { restorePointCollectionName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists diskRestorePoints under a vmRestorePoint.") + @operationId("DiskRestorePoint_ListByRestorePoint") listByRestorePoint is ArmResourceListByParent< DiskRestorePoint, { @@ -44,7 +51,10 @@ interface DiskRestorePoint { restorePointCollectionName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Grants access to a diskRestorePoint.") + @operationId("DiskRestorePoint_GrantAccess") grantAccess is ArmResourceActionAsync< DiskRestorePoint, GrantAccessData, @@ -55,9 +65,13 @@ interface DiskRestorePoint { @doc("The name of the restore point collection that the disk restore point belongs.") @path restorePointCollectionName: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Revokes access to a diskRestorePoint.") + @operationId("DiskRestorePoint_RevokeAccess") revokeAccess is ArmResourceActionAsync< DiskRestorePoint, void, @@ -68,6 +82,7 @@ interface DiskRestorePoint { @doc("The name of the restore point collection that the disk restore point belongs.") @path restorePointCollectionName: string; - } + }, + ArmLroLocationHeader >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp index 736486b104..f40441ce59 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Gallery.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the Shared Image Gallery that you want to create or update.") @@ -35,20 +37,24 @@ interface Galleries { $expand?: GalleryExpandParams; } >; + @doc("Create or update a Shared Image Gallery.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a Shared Image Gallery.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Delete a Shared Image Gallery.") delete is ArmResourceDeleteAsync; + @doc("List galleries under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("List galleries under a subscription.") list is ArmListBySubscription; -} -@armResourceOperations -interface GallerySharingProfile { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update sharing profile of a gallery.") + @operationId("GallerySharingProfile_Update") update is ArmResourceActionAsync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp index db390620d8..65a4a314f8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplication.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Gallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery Application Definition that you want to create or update.") @@ -24,15 +26,16 @@ model GalleryApplication is TrackedResource { interface GalleryApplications { @doc("Retrieves information about a gallery Application Definition.") get is ArmResourceRead; + @doc("Create or update a gallery Application Definition.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery Application Definition.") - update is ArmResourcePatchAsync< - GalleryApplication, - GalleryApplicationProperties - >; + update is ArmCustomPatchAsync; + @doc("Delete a gallery Application.") delete is ArmResourceDeleteAsync; + @doc("List gallery Application Definitions in a gallery.") listByGallery is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp index 839d86ca6e..9431ac192e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryApplicationVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GalleryApplication.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery Application Version that you want to create or update.") @@ -34,15 +36,19 @@ interface GalleryApplicationVersions { $expand?: ReplicationStatusTypes; } >; + @doc("Create or update a gallery Application Version.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery Application Version.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< GalleryApplicationVersion, - GalleryApplicationVersionProperties + GalleryApplicationVersionUpdate >; + @doc("Delete a gallery Application Version.") delete is ArmResourceDeleteAsync; + @doc("List gallery Application Versions in a gallery Application Definition.") listByGalleryApplication is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp index 280fca9170..d55dc31144 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Gallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image definition that you want to create or update.") @@ -24,12 +26,16 @@ model GalleryImage is TrackedResource { interface GalleryImages { @doc("Retrieves information about a gallery image definition.") get is ArmResourceRead; + @doc("Create or update a gallery image definition.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery image definition.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Delete a gallery image.") delete is ArmResourceDeleteAsync; + @doc("List gallery image definitions in a gallery.") listByGallery is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp index 071e2b238a..585dc127bb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/GalleryImageVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./GalleryImage.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image version that you want to create or update.") @@ -33,15 +35,16 @@ interface GalleryImageVersions { $expand?: ReplicationStatusTypes; } >; + @doc("Create or update a gallery image version.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update a gallery image version.") - update is ArmResourcePatchAsync< - GalleryImageVersion, - GalleryImageVersionProperties - >; + update is ArmCustomPatchAsync; + @doc("Delete a gallery image version.") delete is ArmResourceDeleteAsync; + @doc("List gallery image versions in a gallery image definition.") listByGalleryImage is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp index 68bf122274..750a9b9fd7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Image.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.") @@ -34,14 +36,19 @@ interface Images { $expand?: string; } >; + @doc("Create or update an image.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Update an image.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes an Image.") delete is ArmResourceDeleteAsync; + @doc("Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") listByResourceGroup is ArmResourceListByParent; + @doc("Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.") list is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp index c941f39dbb..d70ee270d9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSFamily.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a cloud service OS family.") @@ -20,9 +22,14 @@ model OSFamily is ProxyResource { } @armResourceOperations -interface CloudServiceOperatingSystems { +interface OSFamilies { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets properties of a guest operating system family that can be specified in the XML service configuration (.cscfg) for a cloud service.") + @operationId("CloudServiceOperatingSystems_GetOSFamily") getOSFamily is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all guest operating system families available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS Families. Do this till nextLink is null to fetch all the OS Families.") + @operationId("CloudServiceOperatingSystems_ListOSFamilies") listOSFamilies is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp index 5351eac17b..f4d2ae8858 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/OSVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a cloud service OS version.") @@ -20,9 +22,14 @@ model OSVersion is ProxyResource { } @armResourceOperations -interface CloudServiceOperatingSystems { +interface OSVersions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets properties of a guest operating system version that can be specified in the XML service configuration (.cscfg) for a cloud service.") + @operationId("CloudServiceOperatingSystems_GetOSVersion") getOSVersion is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all guest operating system versions available to be specified in the XML service configuration (.cscfg) for a cloud service. Use nextLink property in the response to get the next page of OS versions. Do this till nextLink is null to fetch all the OS versions.") + @operationId("CloudServiceOperatingSystems_ListOSVersions") listOSVersions is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp index 20aeb5e00d..d89816e38b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DiskAccess.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("The Private Endpoint Connection resource.") @@ -22,13 +24,24 @@ model PrivateEndpointConnection } @armResourceOperations -interface DiskAccesses { +interface PrivateEndpointConnections { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets information about a private endpoint connection under a disk access resource.") + @operationId("DiskAccesses_GetAPrivateEndpointConnection") getAPrivateEndpointConnection is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Approve or reject a private endpoint connection under disk access resource, this can't be used to create a new private endpoint connection.") + @operationId("DiskAccesses_UpdateAPrivateEndpointConnection") updateAPrivateEndpointConnection is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes a private endpoint connection under a disk access resource.") + @operationId("DiskAccesses_DeleteAPrivateEndpointConnection") deleteAPrivateEndpointConnection is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List information about private endpoint connections under a disk access resource") + @operationId("DiskAccesses_ListPrivateEndpointConnections") listPrivateEndpointConnections is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp index a5ef15b6de..fb626581b0 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/ProximityPlacementGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the proximity placement group.") @@ -35,18 +37,22 @@ interface ProximityPlacementGroups { includeColocationStatus?: string; } >; + @doc("Create or update a proximity placement group.") createOrUpdate is ArmResourceCreateOrReplaceSync; - // FIXME: (ArmResourcePatch): ArmResourcePatchSync/ArmResourcePatchAsync should have a body parameter with either properties property or tag property + @doc("Update a proximity placement group.") update is ArmCustomPatchSync< ProximityPlacementGroup, ProximityPlacementGroupUpdate >; + @doc("Delete a proximity placement group.") delete is ArmResourceDeleteSync; + @doc("Lists all proximity placement groups in a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all proximity placement groups in a subscription.") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp index 99a5d6a086..5afd3be400 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePoint.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./RestorePointCollection.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Restore Point details.") @@ -37,6 +39,7 @@ interface RestorePoints { $expand?: RestorePointExpandOptions; } >; + @doc("The operation to create the restore point. Updating properties of an existing restore point is not allowed") create is ArmResourceCreateOrUpdateAsync< RestorePoint, @@ -48,6 +51,7 @@ interface RestorePoints { restorePointCollectionName: string; } >; + @doc("The operation to delete the restore point.") delete is ArmResourceDeleteAsync< RestorePoint, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp index 40be5b7baf..f6566ea20f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RestorePointCollection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Create or update Restore Point collection parameters.") @@ -36,6 +38,7 @@ interface RestorePointCollections { $expand?: RestorePointCollectionExpandOptions; } >; + @doc("The operation to create or update the restore point collection. Please refer to https://aka.ms/RestorePoints for more details. When updating a restore point collection, only tags may be modified.") createOrUpdate is ArmResourceCreateOrReplaceSync< RestorePointCollection, @@ -47,10 +50,11 @@ interface RestorePointCollections { restorePointCollectionName: string; } >; + @doc("The operation to update the restore point collection.") - update is ArmResourcePatchSync< + update is ArmCustomPatchSync< RestorePointCollection, - RestorePointCollectionProperties, + RestorePointCollectionUpdate, { ...BaseParameters; @@ -59,6 +63,7 @@ interface RestorePointCollections { restorePointCollectionName: string; } >; + @doc("The operation to delete the restore point collection. This operation will also delete all the contained restore points.") delete is ArmResourceDeleteAsync< RestorePointCollection, @@ -70,8 +75,10 @@ interface RestorePointCollections { restorePointCollectionName: string; } >; + @doc("Gets the list of restore point collections in a resource group.") list is ArmResourceListByParent; + @doc("Gets the list of restore point collections in the subscription. Use nextLink property in the response to get the next page of restore point collections. Do this till nextLink is not null to fetch all the restore point collections.") listAll is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp index 910bfe6dbe..fcc6d72cbc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RoleInstance.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./CloudService.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes the cloud service role instance.") @@ -23,8 +25,10 @@ model RoleInstance is ProxyResource { } @armResourceOperations -interface CloudServiceRoleInstances { +interface RoleInstances { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a role instance from a cloud service.") + @operationId("CloudServiceRoleInstances_Get") get is ArmResourceRead< RoleInstance, { @@ -35,9 +39,15 @@ interface CloudServiceRoleInstances { $expand?: InstanceViewTypes; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes a role instance from a cloud service.") + @operationId("CloudServiceRoleInstances_Delete") delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("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.") + @operationId("CloudServiceRoleInstances_List") list is ArmResourceListByParent< RoleInstance, { @@ -48,13 +58,26 @@ interface CloudServiceRoleInstances { $expand?: InstanceViewTypes; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The Reboot Role Instance asynchronous operation requests a reboot of a role instance in the cloud service.") + @operationId("CloudServiceRoleInstances_Restart") restart is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The Reimage Role Instance asynchronous operation reinstalls the operating system on instances of web roles or worker roles.") + @operationId("CloudServiceRoleInstances_Reimage") reimage is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The Rebuild Role Instance asynchronous operation reinstalls the operating system on instances of web 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.") + @operationId("CloudServiceRoleInstances_Rebuild") rebuild is ArmResourceActionAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServiceRoleInstances_GetInstanceView") @doc("Retrieves information about the run-time state of a role instance in a cloud service.") + // FIXME: CloudServiceRoleInstances_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< @@ -78,7 +101,10 @@ interface CloudServiceRoleInstances { RoleInstanceInstanceView >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("CloudServiceRoleInstances_GetRemoteDesktopFile") @doc("Gets a remote desktop file for a role instance in a cloud service.") + // FIXME: CloudServiceRoleInstances_GetRemoteDesktopFile could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/remoteDesktopFile") @get GetRemoteDesktopFile is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp index 4c99f1f248..c16c53e721 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/RollingUpgradeStatusInfo.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSet.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("The status of the latest virtual machine scale set rolling upgrade.") @@ -15,14 +17,16 @@ namespace Microsoft.Compute; @parentResource(VirtualMachineScaleSet) model RollingUpgradeStatusInfo is TrackedResource { - @key("latest") + @key("rollingUpgrade") @segment("rollingUpgrades") name: string; } @armResourceOperations -interface VirtualMachineScaleSetRollingUpgrades { +interface RollingUpgradeStatusInfos { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the status of the latest virtual machine scale set rolling upgrade.") + @operationId("VirtualMachineScaleSetRollingUpgrades_GetLatest") getLatest is ArmResourceRead< RollingUpgradeStatusInfo, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp index b6287911be..e3eaf46391 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGallery.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; // FIXME: SharedGallery has no properties property @@ -24,6 +26,7 @@ model SharedGallery is ProxyResource<{}> { interface SharedGalleries { @doc("Get a shared gallery by subscription id or tenant id.") get is ArmResourceRead; + @doc("List shared galleries by subscription id or tenant id.") list is ArmResourceListByParent< SharedGallery, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp index fd2319b665..7d15bca18b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./SharedGallery.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image definition that you want to create or update.") @@ -24,6 +26,7 @@ model SharedGalleryImage is ProxyResource { interface SharedGalleryImages { @doc("Get a shared gallery image by subscription id or tenant id.") get is ArmResourceRead; + @doc("List shared gallery images by subscription id or tenant id.") list is ArmResourceListByParent< SharedGalleryImage, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp index b5d8524312..beea9dc24e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SharedGalleryImageVersion.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./SharedGalleryImage.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the gallery image version that you want to create or update.") @@ -25,6 +27,7 @@ model SharedGalleryImageVersion interface SharedGalleryImageVersions { @doc("Get a shared gallery image version by subscription id or tenant id.") get is ArmResourceRead; + @doc("List shared gallery image versions by subscription id or tenant id.") list is ArmResourceListByParent< SharedGalleryImageVersion, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp index e90b77920c..1b55fff803 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/Snapshot.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Snapshot resource.") @@ -28,18 +30,37 @@ model Snapshot is TrackedResource { interface Snapshots { @doc("Gets information about a snapshot.") get is ArmResourceRead; + @doc("Creates or updates a snapshot.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("Updates (patches) a snapshot.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("Deletes a snapshot.") delete is ArmResourceDeleteAsync; + @doc("Lists snapshots under a resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists snapshots under a subscription.") list is ArmListBySubscription; + @doc("Grants access to a snapshot.") - grantAccess is ArmResourceActionAsync; + grantAccess is ArmResourceActionAsync< + Snapshot, + GrantAccessData, + AccessUri, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Revokes access to a snapshot.") - revokeAccess is ArmResourceActionAsync; + revokeAccess is ArmResourceActionAsync< + Snapshot, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp index 1f40c59c4e..d02997a9c7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/SshPublicKeyResource.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Specifies information about the SSH public key.") @@ -19,23 +21,43 @@ model SshPublicKeyResource is TrackedResource { } @armResourceOperations -interface SshPublicKeys { +interface SshPublicKeyResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Retrieves information about an SSH public key.") + @operationId("SshPublicKeys_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new SSH public key resource.") + @operationId("SshPublicKeys_Create") create is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates a new SSH public key resource.") - update is ArmResourcePatchSync< + @operationId("SshPublicKeys_Update") + update is ArmCustomPatchSync< SshPublicKeyResource, - SshPublicKeyResourceProperties + SshPublicKeyUpdateResource >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete an SSH public key.") + @operationId("SshPublicKeys_Delete") delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all of the SSH public keys in the specified resource group. Use the nextLink property in the response to get the next page of SSH public keys.") + @operationId("SshPublicKeys_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Lists all of the SSH public keys in the subscription. Use the nextLink property in the response to get the next page of SSH public keys.") + @operationId("SshPublicKeys_ListBySubscription") listBySubscription is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Generates and returns a public/private key pair and populates the SSH public key resource with the public key. The length of the key will be 3072 bits. This operation can only be performed once per SSH public key resource.") + @operationId("SshPublicKeys_GenerateKeyPair") generateKeyPair is ArmResourceActionSync< SshPublicKeyResource, void, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp index c130c7cf5d..bc9689a854 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachine.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine.") @@ -44,10 +46,13 @@ interface VirtualMachines { $expand?: InstanceViewTypes; } >; + @doc("The operation to create or update a virtual machine. Please note some properties can be set only during virtual machine creation.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update a virtual machine.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync; + @doc("The operation to delete a virtual machine.") delete is ArmResourceDeleteAsync< VirtualMachine, @@ -59,6 +64,7 @@ interface VirtualMachines { forceDeletion?: boolean; } >; + @doc("Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines.") list is ArmResourceListByParent< VirtualMachine, @@ -74,6 +80,7 @@ interface VirtualMachines { $expand?: ExpandTypeForListVMs; } >; + @doc("Gets all the virtual machines under the specified subscription for the specified location.") listByLocation is ArmResourceListAtScope< VirtualMachine, @@ -87,16 +94,22 @@ interface VirtualMachines { location: string; } >; + @doc("Lists all of the virtual machines in the specified subscription. Use the nextLink property in the response to get the next page of virtual machines.") listAll is ArmListBySubscription; + @doc("Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs.") capture is ArmResourceActionAsync< VirtualMachine, VirtualMachineCaptureParameters, - VirtualMachineCaptureResult + VirtualMachineCaptureResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Converts virtual machine disks from blob-based to managed disks. Virtual machine must be stop-deallocated before invoking this operation.") convertToManagedDisks is ArmResourceActionAsync; + @doc("Shuts down the virtual machine and releases the compute resources. You are not billed for the compute resources that this virtual machine uses.") deallocate is ArmResourceActionAsync< VirtualMachine, @@ -110,8 +123,10 @@ interface VirtualMachines { hibernate?: boolean; } >; + @doc("Sets the OS state of the virtual machine to generalized. It is recommended to sysprep the virtual machine before performing this operation. For Windows, please refer to [Create a managed image of a generalized VM in Azure](https://docs.microsoft.com/azure/virtual-machines/windows/capture-image-resource). For Linux, please refer to [How to create an image of a virtual machine or VHD](https://docs.microsoft.com/azure/virtual-machines/linux/capture-image).") generalize is ArmResourceActionSync; + @doc("The operation to power off (stop) a virtual machine. The virtual machine can be restarted with the same provisioned resources. You are still charged for this virtual machine.") powerOff is ArmResourceActionAsync< VirtualMachine, @@ -125,20 +140,26 @@ interface VirtualMachines { skipShutdown?: boolean; } >; + @doc("The operation to reapply a virtual machine's state.") reapply is ArmResourceActionAsync; + @doc("The operation to restart a virtual machine.") restart is ArmResourceActionAsync; + @doc("The operation to start a virtual machine.") start is ArmResourceActionAsync; + @doc("Shuts down the virtual machine, moves it to a new node, and powers it back on.") redeploy is ArmResourceActionAsync; + @doc("Reimages (upgrade the operating system) a virtual machine which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state. NOTE: The retaining of old OS disk depends on the value of deleteOption of OS disk. If deleteOption is detach, the old OS disk will be preserved after reimage. If deleteOption is delete, the old OS disk will be deleted after reimage. The deleteOption of the OS disk should be updated accordingly before performing the reimage.") reimage is ArmResourceActionAsync< VirtualMachine, VirtualMachineReimageParameters, void >; + @doc("The operation to retrieve SAS URIs for a virtual machine's boot diagnostic logs.") retrieveBootDiagnosticsData is ArmResourceActionSync< VirtualMachine, @@ -152,29 +173,42 @@ interface VirtualMachines { sasUriExpirationTimeInMinutes?: int32; } >; + @doc("The operation to perform maintenance on a virtual machine.") performMaintenance is ArmResourceActionAsync; + @doc("The operation to simulate the eviction of spot virtual machine.") simulateEviction is ArmResourceActionNoContentSync; + @doc("Assess patches on the VM.") assessPatches is ArmResourceActionAsync< VirtualMachine, void, - VirtualMachineAssessPatchesResult + VirtualMachineAssessPatchesResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Installs patches on the VM.") installPatches is ArmResourceActionAsync< VirtualMachine, VirtualMachineInstallPatchesParameters, - VirtualMachineInstallPatchesResult + VirtualMachineInstallPatchesResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Run command on the VM.") runCommand is ArmResourceActionAsync< VirtualMachine, RunCommandInput, - RunCommandResult + RunCommandResult, + BaseParameters, + ArmLroLocationHeader >; + @doc("Retrieves information about the run-time state of a virtual machine.") + // FIXME: VirtualMachines_InstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/instanceView") @get InstanceView is Azure.Core.Foundations.Operation< @@ -195,6 +229,7 @@ interface VirtualMachines { >; @doc("Lists all available virtual machine sizes to which the specified virtual machine can be resized.") + // FIXME: VirtualMachines_ListAvailableSizes could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/vmSizes") @get ListAvailableSizes is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp index 2bc2115d2d..f50764350d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachine.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Extension.") @@ -34,15 +36,19 @@ interface VirtualMachineExtensions { $expand?: string; } >; + @doc("The operation to create or update the extension.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update the extension.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineExtension, - VirtualMachineExtensionProperties + VirtualMachineExtensionUpdate >; + @doc("The operation to delete the extension.") delete is ArmResourceDeleteAsync; + @doc("The operation to get all extensions of a Virtual Machine.") list is ArmResourceListByParent< VirtualMachineExtension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp index b27cbe68d0..aa42ed2649 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineExtensionImage.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Extension Image.") @@ -23,6 +25,7 @@ model VirtualMachineExtensionImage interface VirtualMachineExtensionImages { @doc("Gets a virtual machine extension image.") get is ArmResourceRead; + @doc("Gets a list of virtual machine extension image types.") listTypes is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp index 5fefe9ab75..3bb3748be4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineRunCommand.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachine.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine run command.") @@ -34,15 +36,19 @@ interface VirtualMachineRunCommands { $expand?: string; } >; + @doc("The operation to create or update the run command.") createOrUpdate is ArmResourceCreateOrUpdateAsync; + @doc("The operation to update the run command.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineRunCommand, - VirtualMachineRunCommandProperties + VirtualMachineRunCommandUpdate >; + @doc("The operation to delete the run command.") delete is ArmResourceDeleteAsync; + @doc("The operation to get all run commands of a Virtual Machine.") listByVirtualMachine is ArmResourceListByParent< VirtualMachineRunCommand, @@ -54,6 +60,7 @@ interface VirtualMachineRunCommands { $expand?: string; } >; + @doc("Lists all available run commands for a subscription in a location.") list is ArmResourceListAtScope< VirtualMachineRunCommand, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp index 8a6111e69d..e795a581dc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSet.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Scale Set.") @@ -46,6 +48,7 @@ interface VirtualMachineScaleSets { $expand?: ExpandTypesForGetVMScaleSets; } >; + @doc("Create or update a VM scale set.") createOrUpdate is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSet, @@ -57,10 +60,11 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Update a VM scale set.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineScaleSet, - VirtualMachineScaleSetProperties, + VirtualMachineScaleSetUpdate, { ...BaseParameters; @@ -69,6 +73,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Deletes a VM scale set.") delete is ArmResourceDeleteAsync< VirtualMachineScaleSet, @@ -84,8 +89,10 @@ interface VirtualMachineScaleSets { forceDeletion?: boolean; } >; + @doc("Gets a list of all VM scale sets under a resource group.") list is ArmResourceListByParent; + @doc("Gets all the VM scale sets under the specified subscription for the specified location.") listByLocation is ArmResourceListAtScope< VirtualMachineScaleSet, @@ -99,8 +106,10 @@ interface VirtualMachineScaleSets { location: string; } >; + @doc("Gets a list of all VM Scale Sets in the subscription, regardless of the associated resource group. Use nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all the VM Scale Sets.") listAll is ArmListBySubscription; + @doc("Deallocates specific virtual machines in a VM scale set. Shuts down the virtual machines and releases the compute resources. You are not billed for the compute resources that this virtual machine scale set deallocates.") deallocate is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -118,6 +127,7 @@ interface VirtualMachineScaleSets { hibernate?: boolean; } >; + @doc("Deletes virtual machines in a VM scale set.") deleteInstances is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -135,6 +145,7 @@ interface VirtualMachineScaleSets { forceDeletion?: boolean; } >; + @doc("Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") powerOff is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -152,6 +163,7 @@ interface VirtualMachineScaleSets { skipShutdown?: boolean; } >; + @doc("Restarts one or more virtual machines in a VM scale set.") restart is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -165,6 +177,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Starts one or more virtual machines in a VM scale set.") start is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -178,6 +191,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Reapplies the Virtual Machine Scale Set Virtual Machine Profile to the Virtual Machine Instances") reapply is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -189,8 +203,10 @@ interface VirtualMachineScaleSets { @doc("The name of the VM scale set.") @path vmScaleSetName: string; - } + }, + ArmLroLocationHeader >; + @doc("Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on.") redeploy is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -204,6 +220,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Perform maintenance on one or more virtual machines in a VM scale set. Operation on instances which are not eligible for perform maintenance will be failed. Please refer to best practices for more details: https://docs.microsoft.com/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-maintenance-notifications") performMaintenance is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -217,6 +234,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Upgrades one or more virtual machines to the latest SKU set in the VM scale set model.") updateInstances is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -230,6 +248,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.") reimage is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -243,6 +262,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Reimages all the disks ( including data disks ) in the virtual machines in a VM scale set. This operation is only supported for managed disks.") reimageAll is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -256,6 +276,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Manual platform update domain walk to update virtual machines in a service fabric virtual machine scale set.") forceRecoveryServiceFabricPlatformUpdateDomainWalk is ArmResourceActionSync< VirtualMachineScaleSet, @@ -281,6 +302,7 @@ interface VirtualMachineScaleSets { placementGroupId?: string; } >; + @doc("Converts SinglePlacementGroup property to false for a existing virtual machine scale set.") convertToSinglePlacementGroup is ArmResourceActionSync< VirtualMachineScaleSet, @@ -294,6 +316,7 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + @doc("Changes ServiceState property for a given service") setOrchestrationServiceState is ArmResourceActionAsync< VirtualMachineScaleSet, @@ -307,7 +330,57 @@ interface VirtualMachineScaleSets { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Cancels the current virtual machine scale set rolling upgrade.") + @operationId("VirtualMachineScaleSetRollingUpgrades_Cancel") + cancel is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.") + @operationId("VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade") + startOSUpgrade is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.") + @operationId("VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade") + startExtensionUpgrade is ArmResourceActionAsync< + VirtualMachineScaleSet, + void, + void, + { + ...BaseParameters; + + @doc("The name of the VM scale set.") + @path + vmScaleSetName: string; + } + >; + @doc("Gets the status of a VM scale set instance.") + // FIXME: VirtualMachineScaleSets_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< @@ -328,6 +401,7 @@ interface VirtualMachineScaleSets { >; @doc("Gets a list of SKUs available for your VM scale set, including the minimum and maximum VM instances allowed for each SKU.") + // FIXME: VirtualMachineScaleSets_ListSkus could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") @get ListSkus is Azure.Core.Foundations.Operation< @@ -347,7 +421,10 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetListSkusResult >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineScaleSets_GetOSUpgradeHistory") @doc("Gets list of OS upgrades on a VM scale set instance.") + // FIXME: VirtualMachineScaleSets_GetOSUpgradeHistory could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") @get GetOSUpgradeHistory is Azure.Core.Foundations.Operation< @@ -367,46 +444,3 @@ interface VirtualMachineScaleSets { VirtualMachineScaleSetListOSUpgradeHistory >; } - -@armResourceOperations -interface VirtualMachineScaleSetRollingUpgrades { - @doc("Cancels the current virtual machine scale set rolling upgrade.") - cancel is ArmResourceActionAsync< - VirtualMachineScaleSet, - void, - void, - { - ...BaseParameters; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - } - >; - @doc("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.") - startOSUpgrade is ArmResourceActionAsync< - VirtualMachineScaleSet, - void, - void, - { - ...BaseParameters; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - } - >; - @doc("Starts a rolling upgrade to move all extensions for all virtual machine scale set instances to the latest available extension version. Instances which are already running the latest extension versions are not affected.") - startExtensionUpgrade is ArmResourceActionAsync< - VirtualMachineScaleSet, - void, - void, - { - ...BaseParameters; - - @doc("The name of the VM scale set.") - @path - vmScaleSetName: string; - } - >; -} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp index 29221a9e25..0066b5a7a1 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSet.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a Virtual Machine Scale Set Extension.") @@ -38,6 +40,7 @@ interface VirtualMachineScaleSetExtensions { $expand?: string; } >; + @doc("The operation to create or update an extension.") createOrUpdate is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSetExtension, @@ -49,10 +52,11 @@ interface VirtualMachineScaleSetExtensions { vmScaleSetName: string; } >; + @doc("The operation to update an extension.") - update is ArmResourcePatchAsync< + update is ArmCustomPatchAsync< VirtualMachineScaleSetExtension, - VirtualMachineScaleSetExtensionProperties, + VirtualMachineScaleSetExtensionUpdate, { ...BaseParameters; @@ -61,6 +65,7 @@ interface VirtualMachineScaleSetExtensions { vmScaleSetName: string; } >; + @doc("The operation to delete the extension.") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetExtension, @@ -72,6 +77,7 @@ interface VirtualMachineScaleSetExtensions { vmScaleSetName: string; } >; + @doc("Gets a list of all extensions in a VM scale set.") list is ArmResourceListByParent< VirtualMachineScaleSetExtension, diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp index f5146dd479..b4f649df86 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVM.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSet.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a virtual machine scale set virtual machine.") @@ -38,8 +40,10 @@ model VirtualMachineScaleSetVM } @armResourceOperations -interface VirtualMachineScaleSetVMs { +interface VirtualMachineScaleSetVMS { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a virtual machine from a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Get") get is ArmResourceRead< VirtualMachineScaleSetVM, { @@ -54,7 +58,10 @@ interface VirtualMachineScaleSetVMs { $expand?: InstanceViewTypes; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Updates a virtual machine of a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Update") update is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSetVM, { @@ -65,7 +72,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes a virtual machine from a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVM, { @@ -80,7 +90,10 @@ interface VirtualMachineScaleSetVMs { forceDeletion?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all virtual machines in a VM scale sets.") + @operationId("VirtualMachineScaleSetVMs_List") list is ArmResourceListByParent< VirtualMachineScaleSetVM, { @@ -99,7 +112,10 @@ interface VirtualMachineScaleSetVMs { $expand?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Reimages (upgrade the operating system) a specific virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Reimage") reimage is ArmResourceActionAsync< VirtualMachineScaleSetVM, VirtualMachineScaleSetVMReimageParameters, @@ -112,7 +128,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Allows you to re-image all the disks ( including data disks ) in the a VM scale set instance. This operation is only supported for managed disks.") + @operationId("VirtualMachineScaleSetVMs_ReimageAll") reimageAll is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -125,7 +144,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deallocates a specific virtual machine in a VM scale set. Shuts down the virtual machine and releases the compute resources it uses. You are not billed for the compute resources of this virtual machine once it is deallocated.") + @operationId("VirtualMachineScaleSetVMs_Deallocate") deallocate is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -138,7 +160,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Power off (stop) a virtual machine in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges.") + @operationId("VirtualMachineScaleSetVMs_PowerOff") powerOff is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -155,7 +180,10 @@ interface VirtualMachineScaleSetVMs { skipShutdown?: boolean; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Restarts a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Restart") restart is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -168,7 +196,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Starts a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_Start") start is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -181,7 +212,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Shuts down the virtual machine in the virtual machine scale set, moves it to a new node, and powers it back on.") + @operationId("VirtualMachineScaleSetVMs_Redeploy") redeploy is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -194,7 +228,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to retrieve SAS URIs of boot diagnostic logs for a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData") retrieveBootDiagnosticsData is ArmResourceActionSync< VirtualMachineScaleSetVM, void, @@ -211,7 +248,10 @@ interface VirtualMachineScaleSetVMs { sasUriExpirationTimeInMinutes?: int32; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Performs maintenance on a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_PerformMaintenance") performMaintenance is ArmResourceActionAsync< VirtualMachineScaleSetVM, void, @@ -224,7 +264,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to simulate the eviction of spot virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_SimulateEviction") simulateEviction is ArmResourceActionNoContentSync< VirtualMachineScaleSetVM, void, @@ -236,7 +279,10 @@ interface VirtualMachineScaleSetVMs { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Run command on a virtual machine in a VM scale set.") + @operationId("VirtualMachineScaleSetVMs_RunCommand") runCommand is ArmResourceActionAsync< VirtualMachineScaleSetVM, RunCommandInput, @@ -247,9 +293,14 @@ interface VirtualMachineScaleSetVMs { @doc("The name of the VM scale set.") @path vmScaleSetName: string; - } + }, + ArmLroLocationHeader >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("VirtualMachineScaleSetVMs_GetInstanceView") @doc("Gets the status of a virtual machine from a VM scale set.") + // FIXME: VirtualMachineScaleSetVMs_GetInstanceView could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/instanceView") @get GetInstanceView is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp index 31ee9b8c15..3c7653a86c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/VirtualMachineScaleSetVMExtension.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./VirtualMachineScaleSetVM.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Compute; @doc("Describes a VMSS VM Extension.") @@ -23,7 +25,9 @@ model VirtualMachineScaleSetVMExtension @armResourceOperations interface VirtualMachineScaleSetVMExtensions { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to get the VMSS VM extension.") + @operationId("VirtualMachineScaleSetVMExtensions_Get") get is ArmResourceRead< VirtualMachineScaleSetVMExtension, { @@ -38,7 +42,10 @@ interface VirtualMachineScaleSetVMExtensions { $expand?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to create or update the VMSS VM extension.") + @operationId("VirtualMachineScaleSetVMExtensions_CreateOrUpdate") createOrUpdate is ArmResourceCreateOrUpdateAsync< VirtualMachineScaleSetVMExtension, { @@ -49,10 +56,13 @@ interface VirtualMachineScaleSetVMExtensions { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to update the VMSS VM extension.") - update is ArmResourcePatchAsync< + @operationId("VirtualMachineScaleSetVMExtensions_Update") + update is ArmCustomPatchAsync< VirtualMachineScaleSetVMExtension, - VirtualMachineExtensionProperties, + VirtualMachineScaleSetVMExtensionUpdate, { ...BaseParameters; @@ -61,7 +71,10 @@ interface VirtualMachineScaleSetVMExtensions { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to delete the VMSS VM extension.") + @operationId("VirtualMachineScaleSetVMExtensions_Delete") delete is ArmResourceDeleteAsync< VirtualMachineScaleSetVMExtension, { @@ -72,7 +85,10 @@ interface VirtualMachineScaleSetVMExtensions { vmScaleSetName: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("The operation to get all extensions of an instance in Virtual Machine Scaleset.") + @operationId("VirtualMachineScaleSetVMExtensions_List") list is ArmResourceListByParent< VirtualMachineScaleSetVMExtension, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json new file mode 100644 index 0000000000..ad7cf8261f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "myAvailabilitySet", + "parameters": { + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20 + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myAvailabilitySet", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20 + }, + "sku": { + "name": "Classic" + } + } + } + }, + "operationId": "AvailabilitySets_CreateOrUpdate", + "title": "Create an availability set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json new file mode 100644 index 0000000000..44bd604bb8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AvailabilitySets_Delete", + "title": "AvailabilitySet_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json new file mode 100644 index 0000000000..f502a475cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Delete_AvailabilitySetDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "AvailabilitySets_Delete", + "title": "AvailabilitySet_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json new file mode 100644 index 0000000000..895dc6aed5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myAvailabilitySet", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": { + "key2505": "aa", + "key9626": "aaaaaaaaaaaaaaaaaaaa" + } + } + } + }, + "operationId": "AvailabilitySets_Get", + "title": "AvailabilitySet_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json new file mode 100644 index 0000000000..e8482da662 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Get_AvailabilitySetGetMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus" + } + } + }, + "operationId": "AvailabilitySets_Get", + "title": "AvailabilitySet_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json new file mode 100644 index 0000000000..e7318d2b54 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMaximumSetGen.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Standard_A1_V2", + "maxDataDiskCount": 2, + "memoryInMB": 2048, + "numberOfCores": 1, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 10240 + }, + { + "name": "Standard_A2_V2", + "maxDataDiskCount": 4, + "memoryInMB": 4096, + "numberOfCores": 2, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 20480 + } + ] + } + } + }, + "operationId": "AvailabilitySets_ListAvailableSizes", + "title": "AvailabilitySet_ListAvailableSizes_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json new file mode 100644 index 0000000000..f48edb649c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListAvailableSizes_AvailabilitySetListAvailableSizesMinimumSetGen.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "AvailabilitySets_ListAvailableSizes", + "title": "AvailabilitySet_ListAvailableSizes_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json new file mode 100644 index 0000000000..3da2809002 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_ListBySubscription.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "$expand": "virtualMachines\\$ref", + "api-version": "2023-07-01", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [] + }, + "sku": { + "name": "Classic" + }, + "tags": { + "{tagName}": "{tagValue}" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "virtualMachines": [] + }, + "sku": { + "name": "Classic" + }, + "tags": { + "{tagName}": "{tagValue}" + } + } + ] + } + } + }, + "operationId": "AvailabilitySets_ListBySubscription", + "title": "List availability sets in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json new file mode 100644 index 0000000000..63d6aed23d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMaximumSetGen.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaa", + "value": [ + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 22, + "tier": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "tags": { + "key2039": "aaaaaaaaaaaaa" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "australiasoutheast", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 23, + "tier": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "tags": { + "key5849": "aaaaaaaaaaaaaaa" + } + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [] + }, + "sku": { + "name": "Classic", + "capacity": 26, + "tier": "aaaaaaaaaaaaaaaaaaaaa" + }, + "tags": {} + }, + { + "name": "{availabilitySetName}", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}", + "location": "westcentralus", + "properties": { + "platformFaultDomainCount": 3, + "platformUpdateDomainCount": 5, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaa", + "displayStatus": "aaaaaaaaaaa", + "level": "Info", + "message": "aaaaaa", + "time": "2021-11-30T13:39:56.427Z" + } + ], + "virtualMachines": [] + }, + "sku": { + "name": "Classic", + "capacity": 6, + "tier": "aaaaaaaaaaaaaaaaaa" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "AvailabilitySets_List", + "title": "AvailabilitySet_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json new file mode 100644 index 0000000000..b6d9e8124b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_List_AvailabilitySetListMinimumSetGen.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet1", + "location": "australiasoutheast" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet2", + "location": "australiasoutheast" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet3", + "location": "westcentralus" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet4", + "location": "westcentralus" + } + ] + } + } + }, + "operationId": "AvailabilitySets_List", + "title": "AvailabilitySet_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json new file mode 100644 index 0000000000..d3cb1dd466 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMaximumSetGen.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": { + "key2574": "aaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myAvailabilitySet", + "type": "Microsoft.Compute/availabilitySets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/myAvailabilitySet", + "location": "westus", + "properties": { + "platformFaultDomainCount": 2, + "platformUpdateDomainCount": 20, + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "virtualMachines": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ] + }, + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": { + "key2505": "aa", + "key9626": "aaaaaaaaaaaaaaaaaaaa" + } + } + } + }, + "operationId": "AvailabilitySets_Update", + "title": "AvailabilitySet_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json new file mode 100644 index 0000000000..40886eaebc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/AvailabilitySets_Update_AvailabilitySetUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "availabilitySetName": "aaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "AvailabilitySets_Update", + "title": "AvailabilitySet_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..edb3742bbe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "parameters": { + "location": "westus", + "tags": { + "department": "finance" + }, + "zones": [ + "1", + "2" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservationGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "tags": { + "department": "finance", + "owner": "myCompany" + }, + "zones": [ + "1", + "2" + ] + } + }, + "201": { + "body": { + "name": "myCapacityReservationGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "tags": { + "department": "finance" + }, + "zones": [ + "1", + "2" + ] + } + } + }, + "operationId": "CapacityReservationGroups_CreateOrUpdate", + "title": "Create or update a capacity reservation group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json new file mode 100644 index 0000000000..2b86452d40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "a", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "CapacityReservationGroups_Delete", + "title": "CapacityReservationGroup_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json new file mode 100644 index 0000000000..32bcaa9b49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Delete_CapacityReservationGroupDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "CapacityReservationGroups_Delete", + "title": "CapacityReservationGroup_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json new file mode 100644 index 0000000000..bcad9a4a16 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Get.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "$expand": "instanceView", + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservationGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2" + } + ], + "instanceView": { + "capacityReservations": [ + { + "name": "myCapacityReservation1", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + } + ], + "utilizationInfo": { + "currentCapacity": 5, + "virtualMachinesAllocated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + { + "name": "myCapacityReservation2", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + } + ], + "utilizationInfo": { + "currentCapacity": 5, + "virtualMachinesAllocated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4" + } + ] + } + } + ] + } + }, + "tags": { + "{tagName}": "{tagValue}" + }, + "zones": [ + "3", + "1" + ] + } + } + }, + "operationId": "CapacityReservationGroups_Get", + "title": "Get a capacity reservation Group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json new file mode 100644 index 0000000000..fcd3c9af0a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListByResourceGroup.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$expand": "virtualMachines/$ref", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation3" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation4" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + } + } + ] + } + } + }, + "operationId": "CapacityReservationGroups_ListByResourceGroup", + "title": "List capacity reservation groups in resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json new file mode 100644 index 0000000000..fe2f7d8498 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_ListBySubscription.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "$expand": "virtualMachines/$ref", + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup1/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + { + "name": "{capacityReservationGroupName}", + "type": "Microsoft.Compute/CapacityReservationGroups", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}", + "location": "West US", + "properties": { + "capacityReservations": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation3" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation4" + } + ], + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup2/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + } + } + ] + } + } + }, + "operationId": "CapacityReservationGroups_ListBySubscription", + "title": "List capacity reservation groups in subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json new file mode 100644 index 0000000000..9fb33b8675 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMaximumSetGen.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "instanceView": {} + }, + "tags": { + "key5355": "aaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservationGroup", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup", + "location": "westus", + "properties": { + "capacityReservations": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "capacityReservations": [ + { + "name": "aaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "utilizationInfo": { + "virtualMachinesAllocated": [ + { + "id": "aaaa" + } + ] + } + } + ] + }, + "virtualMachinesAssociated": [ + { + "id": "aaaa" + } + ] + }, + "tags": {}, + "zones": [ + "1", + "2" + ] + } + } + }, + "operationId": "CapacityReservationGroups_Update", + "title": "CapacityReservationGroup_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json new file mode 100644 index 0000000000..4b9a8acb09 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservationGroups_Update_CapacityReservationGroupUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "CapacityReservationGroups_Update", + "title": "CapacityReservationGroup_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json new file mode 100644 index 0000000000..23a39a0965 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_CreateOrUpdate.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "capacityReservationName": "myCapacityReservation", + "parameters": { + "location": "westus", + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservation", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Creating", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}" + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myCapacityReservation", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Creating", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}" + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CapacityReservations_CreateOrUpdate", + "title": "Create or update a capacity reservation ." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json new file mode 100644 index 0000000000..edd26d5900 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaa", + "capacityReservationName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CapacityReservations_Delete", + "title": "CapacityReservation_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json new file mode 100644 index 0000000000..f40891a01c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Delete_CapacityReservationDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaa", + "capacityReservationName": "aaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CapacityReservations_Delete", + "title": "CapacityReservation_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json new file mode 100644 index 0000000000..721bf28ea4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Get.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "$expand": "instanceView", + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "capacityReservationName": "myCapacityReservation", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservation", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "instanceView": { + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + } + ], + "utilizationInfo": { + "currentCapacity": 5, + "virtualMachinesAllocated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + } + ] + } + }, + "platformFaultDomainCount": 3, + "provisioningState": "Succeeded", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "CapacityReservations_Get", + "title": "Get a capacity reservation." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json new file mode 100644 index 0000000000..1933739ea0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_ListByCapacityReservationGroup.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "$expand": "virtualMachines/$ref", + "api-version": "2023-07-01", + "capacityReservationGroupName": "myCapacityReservationGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{capacityReservationName}", + "type": "Microsoft.Compute/CapacityReservations", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/CapacityReservation/{capacityReservationName}", + "location": "West US", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Succeeded", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3" + } + ] + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + }, + { + "name": "{capacityReservationName}", + "type": "Microsoft.Compute/CapacityReservations", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/CapacityReservation/{capacityReservationName}", + "location": "West US", + "properties": { + "platformFaultDomainCount": 3, + "provisioningState": "Succeeded", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "virtualMachinesAssociated": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4" + } + ] + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 4 + }, + "tags": { + "department": "HR" + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "CapacityReservations_ListByCapacityReservationGroup", + "title": "List capacity reservations in reservation group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json new file mode 100644 index 0000000000..cb9599f54a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMaximumSetGen.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaa", + "capacityReservationName": "aaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "instanceView": { + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "utilizationInfo": {} + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 7, + "tier": "aaa" + }, + "tags": { + "key4974": "aaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myCapacityReservation", + "type": "aaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation", + "location": "westus", + "properties": { + "instanceView": { + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "utilizationInfo": { + "virtualMachinesAllocated": [ + { + "id": "aaaa" + } + ] + } + }, + "platformFaultDomainCount": 3, + "provisioningState": "Creating", + "provisioningTime": "2021-06-27T01:02:38.3138469+00:00", + "reservationId": "{GUID}", + "virtualMachinesAssociated": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 4, + "tier": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "1" + ] + } + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CapacityReservations_Update", + "title": "CapacityReservation_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json new file mode 100644 index 0000000000..2364b0d0ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CapacityReservations_Update_CapacityReservationUpdateMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "capacityReservationGroupName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "capacityReservationName": "aaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus", + "sku": {} + } + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CapacityReservations_Update", + "title": "CapacityReservation_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json new file mode 100644 index 0000000000..abe2b4a86b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSFamily.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "osFamilyName": "3", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "3", + "type": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSFamilies/3", + "location": "westus2", + "properties": { + "name": "3", + "label": "Windows Server 2012", + "versions": [ + { + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + ] + } + } + } + }, + "operationId": "CloudServiceOperatingSystems_GetOSFamily", + "title": "Get Cloud Service OS Family" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json new file mode 100644 index 0000000000..2f801be81a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_GetOSVersion.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "osVersionName": "WA-GUEST-OS-3.90_202010-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "WA-GUEST-OS-3.90_202010-02", + "type": "Microsoft.Compute/locations/cloudServiceOsVersions", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSVersions/WA-GUEST-OS-3.90_202010-02", + "location": "westus2", + "properties": { + "family": "3", + "familyLabel": "Windows Server 2012", + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + } + } + }, + "operationId": "CloudServiceOperatingSystems_GetOSVersion", + "title": "Get Cloud Service OS Version" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json new file mode 100644 index 0000000000..2a3bb96cf3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSFamilies.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "3", + "type": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSFamilies/3", + "location": "westus2", + "properties": { + "name": "3", + "label": "Windows Server 2012", + "versions": [ + { + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + ] + } + }, + { + "name": "4", + "type": "Microsoft.Compute/locations/cloudServiceOsFamilies", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSFamilies/4", + "location": "westus2", + "properties": { + "name": "4", + "label": "Windows Server 2012 R2", + "versions": [ + { + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 4.83 (Release 202010-02)", + "version": "WA-GUEST-OS-4.83_202010-02" + } + ] + } + } + ] + } + } + }, + "operationId": "CloudServiceOperatingSystems_ListOSFamilies", + "title": "List Cloud Service OS Families in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json new file mode 100644 index 0000000000..cb4c51b561 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceOperatingSystems_ListOSVersions.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "location": "westus2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "WA-GUEST-OS-3.90_202010-02", + "type": "Microsoft.Compute/locations/cloudServiceOsVersions", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSVersions/WA-GUEST-OS-3.90_202010-02", + "location": "westus2", + "properties": { + "family": "3", + "familyLabel": "Windows Server 2012", + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 3.90 (Release 202010-02)", + "version": "WA-GUEST-OS-3.90_202010-02" + } + }, + { + "name": "WA-GUEST-OS-4.83_202010-02", + "type": "Microsoft.Compute/locations/cloudServiceOsVersions", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/westus2/cloudServiceOSVersions/WA-GUEST-OS-4.83_202010-02", + "location": "westus2", + "properties": { + "family": "4", + "familyLabel": "Windows Server 2012 R2", + "isActive": true, + "isDefault": true, + "label": "Windows Azure Guest OS 4.83 (Release 202010-02)", + "version": "WA-GUEST-OS-4.83_202010-02" + } + } + ] + } + } + }, + "operationId": "CloudServiceOperatingSystems_ListOSVersions", + "title": "List Cloud Service OS Versions in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json new file mode 100644 index 0000000000..b8df1b722f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CloudServiceRoleInstances_Delete", + "title": "Delete Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json new file mode 100644 index 0000000000..8a2606ae0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{roleInstance-name}", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/{roleInstance-name}", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/{roleInstance-name}/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + } + } + }, + "operationId": "CloudServiceRoleInstances_Get", + "title": "Get Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json new file mode 100644 index 0000000000..307b715fce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetInstanceView.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "platformFaultDomain": 0, + "platformUpdateDomain": 0, + "privateId": "3491bc0c-1f6c-444f-b1d0-ec0751a74e3e", + "statuses": [ + { + "code": "RoleState/RoleStateStarted", + "displayStatus": "RoleStateStarted", + "level": "Info", + "message": "" + } + ] + } + } + }, + "operationId": "CloudServiceRoleInstances_GetInstanceView", + "title": "Get Instance View of Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json new file mode 100644 index 0000000000..8b43b9f11b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_GetRemoteDesktopFile.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "aaaa", + "resourceGroupName": "rgcloudService", + "roleInstanceName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "CloudServiceRoleInstances_GetRemoteDesktopFile", + "title": "Get Cloud Service Role" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json new file mode 100644 index 0000000000..718c9d9fcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_List.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ContosoFrontend_IN_0", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_0", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_0/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + }, + { + "name": "ContosoFrontend_IN_1", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_1", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoFrontend_IN_1/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + }, + { + "name": "ContosoBackend_IN_0", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_0", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_0/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + }, + { + "name": "ContosoBackend_IN_1", + "type": "Microsoft.Compute/cloudServices/roleInstances", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_1", + "location": "eastus2euap", + "properties": { + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roleInstances/ContosoBackend_IN_1/networkInterfaces/nic1" + } + ] + } + }, + "sku": { + "name": "Standard_D1_v2", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "CloudServiceRoleInstances_List", + "title": "List Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json new file mode 100644 index 0000000000..707b007181 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Rebuild.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServiceRoleInstances_Rebuild", + "title": "Rebuild Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json new file mode 100644 index 0000000000..efd63caf2b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Reimage.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServiceRoleInstances_Reimage", + "title": "Reimage Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json new file mode 100644 index 0000000000..7dbca66eee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoleInstances_Restart.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleInstanceName": "{roleInstance-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServiceRoleInstances_Restart", + "title": "Restart Cloud Service Role Instance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json new file mode 100644 index 0000000000..ee23664519 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_Get.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "roleName": "{role-name}", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{role-name}", + "type": "Microsoft.Compute/cloudServices/roles", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/{role-name}", + "location": "eastus2euap", + "properties": { + "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:{role-name}" + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + } + }, + "operationId": "CloudServiceRoles_Get", + "title": "Get Cloud Service Role" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json new file mode 100644 index 0000000000..64baab5269 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServiceRoles_List.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ContosoFrontend", + "type": "Microsoft.Compute/cloudServices/roles", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/ContosoFrontend", + "location": "eastus2euap", + "properties": { + "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:ContosoFrontend" + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "type": "Microsoft.Compute/cloudServices/roles", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/roles/ContosoBackend", + "location": "eastus2euap", + "properties": { + "uniqueId": "b03bc269-766b-4921-b91a-7dffaae4d03b:ContosoBackend" + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "CloudServiceRoles_List", + "title": "List Roles in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json new file mode 100644 index 0000000000..495339ddbd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_GetUpdateDomain.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}", + "updateDomain": 1 + }, + "responses": { + "200": { + "body": { + "name": "1", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/updateDomains/1" + } + } + }, + "operationId": "CloudServicesUpdateDomain_GetUpdateDomain", + "title": "Get Cloud Service Update Domain" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json new file mode 100644 index 0000000000..61785c54ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServicesUpdateDomain_ListUpdateDomains.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "0", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/updateDomains/0" + }, + { + "name": "1", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}/updateDomains/1" + } + ] + } + } + }, + "operationId": "CloudServicesUpdateDomain_ListUpdateDomains", + "title": "List Update Domains in Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json new file mode 100644 index 0000000000..da2891babf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRoles.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Multiple Roles" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json new file mode 100644 index 0000000000..de963c101f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithMultipleRolesInASpecificAvailabilityZone.json @@ -0,0 +1,193 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "7f3edf91-cb34-4a3e-971a-177dc3dd43cb", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + }, + "zones": [ + "1" + ] + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Multiple Roles in a specific availability zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json new file mode 100644 index 0000000000..b7f6eed687 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRole.json @@ -0,0 +1,160 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "myLoadBalancer", + "properties": { + "frontendIpConfigurations": [ + { + "name": "myfe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/myPublicIP" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/5393f919-a68a-43d0-9063-4b2bda6bffdf/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "myLoadBalancer", + "properties": { + "frontendIpConfigurations": [ + { + "name": "myfe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/myPublicIP" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "14d10b45-ced7-42ef-a406-50a3df2cea7d", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/5393f919-a68a-43d0-9063-4b2bda6bffdf/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "myLoadBalancer", + "properties": { + "frontendIpConfigurations": [ + { + "name": "myfe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/myPublicIP" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "14d10b45-ced7-42ef-a406-50a3df2cea7d", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Single Role" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json new file mode 100644 index 0000000000..9b189e543d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndCertificateFromKeyVault.json @@ -0,0 +1,196 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.KeyVault/vaults/{keyvault-name}" + }, + "vaultCertificates": [ + { + "certificateUrl": "https://{keyvault-name}.vault.azure.net:443/secrets/ContosoCertificate/{secret-id}" + } + ] + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.KeyVault/vaults/{keyvault-name}" + }, + "vaultCertificates": [ + { + "certificateUrl": "https://{keyvault-name}.vault.azure.net:443/secrets/ContosoCertificate/{secret-id}" + } + ] + } + ] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "60b6cd59-600b-4e02-b717-521b07aa94bf", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.KeyVault/vaults/{keyvault-name}" + }, + "vaultCertificates": [ + { + "certificateUrl": "https://{keyvault-name}.vault.azure.net:443/secrets/ContosoCertificate/{secret-id}" + } + ] + } + ] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "60b6cd59-600b-4e02-b717-521b07aa94bf", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Single Role and Certificate from Key Vault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json new file mode 100644 index 0000000000..dcd12d1727 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_CreateOrUpdate_CreateNewCloudServiceWithSingleRoleAndRdpExtension.json @@ -0,0 +1,211 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "protectedSettings": "{password}", + "publisher": "Microsoft.Windows.Azure.Extensions", + "settings": "UserAzure10/22/2021 15:05:45", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "packageUrl": "{PackageUrl}", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "upgradeMode": "Auto" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Creating", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "UserAzure10/22/2021 15:05:45", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "c948cccb-bbfa-4516-a250-c28abc4d0c15", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + }, + "201": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "westus", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Creating", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "UserAzure10/22/2021 15:05:45", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "packageUrl": "{PackageUrl}", + "provisioningState": "Creating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 1, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "c948cccb-bbfa-4516-a250-c28abc4d0c15", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_CreateOrUpdate", + "title": "Create New Cloud Service with Single Role and RDP Extension" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json new file mode 100644 index 0000000000..f71f2dec03 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "CloudServices_Delete", + "title": "Delete Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json new file mode 100644 index 0000000000..cf29b274bb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_DeleteInstances.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_DeleteInstances", + "title": "Delete Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json new file mode 100644 index 0000000000..d154530c1b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Get.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "userazure01/12/2022 16:29:02", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Succeeded", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + }, + "systemData": { + "createdAt": "2020-01-01T17:18:19.1234567Z", + "lastModifiedAt": "2020-01-01T17:18:19.1234567Z" + } + } + } + }, + "operationId": "CloudServices_Get", + "title": "Get Cloud Service with Multiple Roles and RDP Extension" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json new file mode 100644 index 0000000000..7aed0fb2f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_GetInstanceView.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "privateIds": [ + "3491bc0c-1f6c-444f-b1d0-ec0751a74e3e" + ], + "roleInstance": { + "statusesSummary": [ + { + "code": "ProvisioningState/succeeded", + "count": 4 + }, + { + "code": "PowerState/started", + "count": 4 + }, + { + "code": "RoleState/RoleStateStarted", + "count": 4 + } + ] + }, + "sdkVersion": "2.9.6496.3", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2021-01-12T16:50:07.0953535+05:30" + }, + { + "code": "PowerState/started", + "displayStatus": "Started", + "level": "Info", + "time": "2021-01-12T16:50:07.0953535+05:30" + }, + { + "code": "CurrentUpgradeDomain/-1", + "displayStatus": "Current Upgrade Domain of cloud service is -1.", + "level": "Info" + }, + { + "code": "MaxUpgradeDomain/1", + "displayStatus": "Max Upgrade Domain of cloud service is 1.", + "level": "Info" + } + ] + } + } + }, + "operationId": "CloudServices_GetInstanceView", + "title": "Get Cloud Service Instance View with Multiple Roles" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json new file mode 100644 index 0000000000..e33ea17b0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_List.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "userazure01/12/2022 16:29:02", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Succeeded", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + } + } + ] + } + } + }, + "operationId": "CloudServices_List", + "title": "List Cloud Services in a Resource Group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json new file mode 100644 index 0000000000..5797982fe7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_ListAll.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "extensionProfile": { + "extensions": [ + { + "name": "RDPExtension", + "properties": { + "type": "RDP", + "autoUpgradeMinorVersion": false, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Windows.Azure.Extensions", + "rolesAppliedTo": [ + "*" + ], + "settings": "userazure01/12/2022 16:29:02", + "typeHandlerVersion": "1.2" + } + } + ] + }, + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Succeeded", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + } + } + ] + } + } + }, + "operationId": "CloudServices_ListAll", + "title": "List Cloud Services in a Subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json new file mode 100644 index 0000000000..a822a28d6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_PowerOff.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_PowerOff", + "title": "Stop or PowerOff Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json new file mode 100644 index 0000000000..6fd9ccb646 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Rebuild.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Rebuild", + "title": "Rebuild Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json new file mode 100644 index 0000000000..990d336c8d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Reimage.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Reimage", + "title": "Reimage Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json new file mode 100644 index 0000000000..d917610d8a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Restart.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "roleInstances": [ + "ContosoFrontend_IN_0", + "ContosoBackend_IN_1" + ] + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Restart", + "title": "Restart Cloud Service Role Instances in a Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json new file mode 100644 index 0000000000..1bf7330ab5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Start.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "CloudServices_Start", + "title": "Start Cloud Service" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json new file mode 100644 index 0000000000..d1d4a02ad1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CloudServices_Update.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2022-09-04", + "cloudServiceName": "{cs-name}", + "parameters": { + "tags": { + "Documentation": "RestAPI" + } + }, + "resourceGroupName": "ConstosoRG", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{cs-name}", + "type": "Microsoft.Compute/cloudServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Compute/cloudServices/{cs-name}", + "location": "eastus2euap", + "properties": { + "configuration": "{ServiceConfiguration}", + "networkProfile": { + "loadBalancerConfigurations": [ + { + "name": "contosolb", + "properties": { + "frontendIpConfigurations": [ + { + "name": "contosofe", + "properties": { + "publicIPAddress": { + "id": "/subscriptions/{subscription-id}/resourceGroups/ConstosoRG/providers/Microsoft.Network/publicIPAddresses/contosopublicip" + } + } + } + ] + } + } + ] + }, + "osProfile": { + "secrets": [] + }, + "provisioningState": "Updating", + "roleProfile": { + "roles": [ + { + "name": "ContosoFrontend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + }, + { + "name": "ContosoBackend", + "sku": { + "name": "Standard_D1_v2", + "capacity": 2, + "tier": "Standard" + } + } + ] + }, + "uniqueId": "4ccb4323-4740-4545-bb81-780b27375947", + "upgradeMode": "Auto" + }, + "tags": { + "Documentation": "RestAPI" + } + } + } + }, + "operationId": "CloudServices_Update", + "title": "Update existing Cloud Service to add tags" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json new file mode 100644 index 0000000000..a9c1bb7e08 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleries_Get.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "publicGalleryName", + "type": "Microsoft.Compute/Locations/CommunityGallery", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName" + }, + "location": "myLocation" + } + } + }, + "operationId": "CommunityGalleries_Get", + "title": "Get a community gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json new file mode 100644 index 0000000000..5160f6236c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "myGalleryImageVersionName", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageVersionName", + "type": "Microsoft.Compute/Locations/CommunityGalleryImageVersion", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + } + }, + "operationId": "CommunityGalleryImageVersions_Get", + "title": "Get a community gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json new file mode 100644 index 0000000000..86f7c0d62f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImageVersions_List.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/communityGalleries/publicGalleryName/images/myGalleryImageName/versions?$skiptoken={token}/communityGalleries/publicGalleryName/images/myGalleryImageName/versions/myGalleryImageVersionName", + "value": [ + { + "name": "myGalleryImageVersionName", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + ] + } + } + }, + "operationId": "CommunityGalleryImageVersions_List", + "title": "List community gallery image versions." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json new file mode 100644 index 0000000000..7b9d86cb4e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "type": "Microsoft.Compute/Locations/CommunityGalleryImage", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "eula": "https://www.microsoft.com/en-us/", + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "privacyStatementUri": "https://www.microsoft.com/en-us/" + } + } + } + }, + "operationId": "CommunityGalleryImages_Get", + "title": "Get a community gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json new file mode 100644 index 0000000000..6407b7fd55 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/CommunityGalleryImages_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "location": "myLocation", + "publicGalleryName": "publicGalleryName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/communityGalleries/publicGalleryName/images?$skiptoken={token}/communityGalleries/publicGalleryName/images/myGalleryImageName", + "value": [ + { + "name": "myGalleryImageName", + "identifier": { + "uniqueId": "/CommunityGalleries/publicGalleryName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + } + ] + } + } + }, + "operationId": "CommunityGalleryImages_List", + "title": "List community gallery images." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json new file mode 100644 index 0000000000..125147ff9e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroup.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "parameters": { + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance", + "owner": "myCompany" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "DedicatedHostGroups_CreateOrUpdate", + "title": "Create or update a dedicated host group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json new file mode 100644 index 0000000000..a885a1cce7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_CreateOrUpdate_CreateOrUpdateADedicatedHostGroupWithUltraSsdSupport.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "parameters": { + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance", + "owner": "myCompany" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "department": "finance" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "DedicatedHostGroups_CreateOrUpdate", + "title": "Create or update a dedicated host group with Ultra SSD support." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json new file mode 100644 index 0000000000..050f761782 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "a", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DedicatedHostGroups_Delete", + "title": "DedicatedHostGroup_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json new file mode 100644 index 0000000000..e1aa46c668 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Delete_DedicatedHostGroupDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "DedicatedHostGroups_Delete", + "title": "DedicatedHostGroup_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json new file mode 100644 index 0000000000..d39c5db72c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateADedicatedHostGroup.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "instanceView", + "hostGroupName": "myDedicatedHostGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/myDedicatedHostGroup/myHostGroup/Hosts/myHost1" + }, + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/myDedicatedHostGroup/myHostGroup/Hosts/myHost2" + } + ], + "instanceView": { + "hosts": [ + { + "name": "myHost1", + "assetId": "eb3f58b8-b4e8-4882-b69f-301a01812407", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + }, + { + "name": "myHost2", + "assetId": "f293d4ac-5eea-4be2-b0c0-0fcaa09aebf8", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "{tagName}": "{tagValue}" + }, + "zones": [ + "3" + ] + } + } + }, + "operationId": "DedicatedHostGroups_Get", + "title": "Create a dedicated host group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json new file mode 100644 index 0000000000..8491a24b96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Get_CreateAnUltraSsdEnabledDedicatedHostGroup.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "instanceView", + "hostGroupName": "myDedicatedHostGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "additionalCapabilities": { + "ultraSSDEnabled": true + }, + "hosts": [ + { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/myDedicatedHostGroup/myHostGroup/Hosts/myHost" + } + ], + "instanceView": { + "hosts": [ + { + "name": "myHost", + "assetId": "eb3f58b8-b4e8-4882-b69f-301a01812407", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "{tagName}": "{tagValue}" + }, + "zones": [ + "3" + ] + } + } + }, + "operationId": "DedicatedHostGroups_Get", + "title": "Create an ultraSSDEnabled dedicated host group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..a644eb3cd7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMaximumSetGen.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "myDedicatedHostGroup", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "hosts": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "assetId": "aaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": {}, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListByResourceGroup", + "title": "DedicatedHostGroup_ListByResourceGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json new file mode 100644 index 0000000000..662b398ffe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListByResourceGroup_DedicatedHostGroupListByResourceGroupMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus" + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListByResourceGroup", + "title": "DedicatedHostGroup_ListByResourceGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..164c5d58cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMaximumSetGen.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "myDedicatedHostGroup", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "hosts": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "assetId": "aaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": {}, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListBySubscription", + "title": "DedicatedHostGroup_ListBySubscription_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json new file mode 100644 index 0000000000..9ea60cd438 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_ListBySubscription_DedicatedHostGroupListBySubscriptionMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus" + } + ] + } + } + }, + "operationId": "DedicatedHostGroups_ListBySubscription", + "title": "DedicatedHostGroup_ListBySubscription_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json new file mode 100644 index 0000000000..577f6d6e9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMaximumSetGen.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaa", + "parameters": { + "properties": { + "instanceView": { + "hosts": [ + { + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": { + "key9921": "aaaaaaaaaa" + }, + "zones": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHostGroup", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup", + "location": "westus", + "properties": { + "hosts": [ + { + "id": "aaaa" + } + ], + "instanceView": { + "hosts": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "assetId": "aaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ] + }, + "platformFaultDomainCount": 3, + "supportAutomaticPlacement": true + }, + "tags": {}, + "zones": [ + "1" + ] + } + } + }, + "operationId": "DedicatedHostGroups_Update", + "title": "DedicatedHostGroup_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json new file mode 100644 index 0000000000..7eaa226fb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHostGroups_Update_DedicatedHostGroupUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "DedicatedHostGroups_Update", + "title": "DedicatedHostGroup_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json new file mode 100644 index 0000000000..50d4403c40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_CreateOrUpdate.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myDedicatedHost", + "parameters": { + "location": "westus", + "properties": { + "platformFaultDomain": 1 + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHost", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": false, + "hostId": "{GUID}", + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1 + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + } + }, + "201": { + "body": { + "name": "myDedicatedHost", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "platformFaultDomain": 1 + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + } + } + }, + "operationId": "DedicatedHosts_CreateOrUpdate", + "title": "Create or update a dedicated host ." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json new file mode 100644 index 0000000000..cdc70982da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaa", + "hostName": "aaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "DedicatedHosts_Delete", + "title": "DedicatedHost_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json new file mode 100644 index 0000000000..55bdcf5c98 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Delete_DedicatedHostDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaaaaaaaa", + "hostName": "aaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "DedicatedHosts_Delete", + "title": "DedicatedHost_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json new file mode 100644 index 0000000000..40ca2c0643 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Get.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$expand": "instanceView", + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myHost", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myHost", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "instanceView": { + "assetId": "eb3f58b8-b4e8-4882-b69f-301a01812407", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 10, + "vmSize": "Standard_A1" + } + ] + }, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info" + }, + { + "code": "HealthState/available", + "displayStatus": "Host available", + "level": "Info" + } + ] + }, + "platformFaultDomain": 1, + "provisioningState": "Succeeded", + "provisioningTime": "2019-06-27T01:02:38.3138469+00:00", + "timeCreated": "2019-06-27T01:02:38.3138469+00:00", + "virtualMachines": [ + { + "id": "/subscriptions/subId/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/vm1" + } + ] + }, + "sku": { + "name": "DSv3-Type1" + }, + "tags": { + "department": "HR" + } + } + } + }, + "operationId": "DedicatedHosts_Get", + "title": "Get a dedicated host." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json new file mode 100644 index 0000000000..7b6d147de6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListAvailableSizes.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myHost", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "value": [ + "Dsv3-Type1", + "Esv3-Type1" + ] + } + } + }, + "operationId": "DedicatedHosts_ListAvailableSizes", + "title": "Get Available Dedicated Host Sizes." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json new file mode 100644 index 0000000000..e2613383c2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMaximumSetGen.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaa", + "value": [ + { + "name": "myDedicatedHost", + "type": "aaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "instanceView": { + "assetId": "aaaaaaaaaaaaaaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + }, + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1, + "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "provisioningTime": "2021-11-30T12:58:26.526Z", + "virtualMachines": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": {} + } + ] + } + } + }, + "operationId": "DedicatedHosts_ListByHostGroup", + "title": "DedicatedHost_ListByHostGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json new file mode 100644 index 0000000000..51e5489c17 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_ListByHostGroup_DedicatedHostListByHostGroupMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myHost", + "location": "westus", + "sku": {} + } + ] + } + } + }, + "operationId": "DedicatedHosts_ListByHostGroup", + "title": "DedicatedHost_ListByHostGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json new file mode 100644 index 0000000000..6808fb913b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Restart.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "myDedicatedHostGroup", + "hostName": "myHost", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "description": "OK" + } + }, + "operationId": "DedicatedHosts_Restart", + "title": "Restart Dedicated Host." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json new file mode 100644 index 0000000000..8652bbe294 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMaximumSetGen.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaa", + "hostName": "aaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "properties": { + "autoReplaceOnFailure": true, + "instanceView": { + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + }, + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1 + }, + "tags": { + "key8813": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHost", + "type": "aaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "instanceView": { + "assetId": "aaaaaaaaaaaaaaaa", + "availableCapacity": { + "allocatableVMs": [ + { + "count": 26, + "vmSize": "aaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + }, + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1, + "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "provisioningTime": "2021-11-30T12:58:26.526Z", + "virtualMachines": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": {} + } + } + }, + "operationId": "DedicatedHosts_Update", + "title": "DedicatedHost_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json new file mode 100644 index 0000000000..5e7df53351 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aa", + "hostName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus", + "sku": {} + } + } + }, + "operationId": "DedicatedHosts_Update", + "title": "DedicatedHost_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json new file mode 100644 index 0000000000..ba5d57b0de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DedicatedHosts_Update_DedicatedHostUpdateResize.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hostGroupName": "aaaaaaaaa", + "hostName": "aaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "sku": { + "name": "DSv3-Type1" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDedicatedHost", + "type": "aaaaaaaaaaaaaaaaaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/HostGroups/myDedicatedHostGroup/hosts/myDedicatedHost", + "location": "westus", + "properties": { + "autoReplaceOnFailure": true, + "hostId": "{GUID}", + "licenseType": "Windows_Server_Hybrid", + "platformFaultDomain": 1, + "provisioningState": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "provisioningTime": "2021-11-30T12:58:26.526Z", + "virtualMachines": [ + { + "id": "aaaa" + } + ] + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": {} + } + } + }, + "operationId": "DedicatedHosts_Update", + "title": "DedicatedHost_Update_Resize" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json new file mode 100644 index 0000000000..4ea504533b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_CreateOrUpdate.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccess": { + "location": "West US" + }, + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + } + } + }, + "202": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US" + } + } + }, + "operationId": "DiskAccesses_CreateOrUpdate", + "title": "Create a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json new file mode 100644 index 0000000000..2eaeb464c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "DiskAccesses_Delete", + "title": "Delete a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json new file mode 100644 index 0000000000..4312a3629d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_DeleteAPrivateEndpointConnection.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "privateEndpointConnectionName": "myPrivateEndpointConnection", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "DiskAccesses_DeleteAPrivateEndpointConnection", + "title": "Delete a private endpoint connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json new file mode 100644 index 0000000000..24e1275532 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetAPrivateEndpointConnection.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "privateEndpointConnectionName": "myPrivateEndpointConnection", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myPrivateEndpointConnection", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnection", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "DiskAccesses_GetAPrivateEndpointConnection", + "title": "Get information about a private endpoint connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json new file mode 100644 index 0000000000..52cf6879f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_GetPrivateLinkResources.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "disks", + "type": "Microsoft.Compute/diskAccesses/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateLinkResources/disks", + "properties": { + "groupId": "disks", + "requiredMembers": [ + "diskAccess_1" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + } + ] + } + } + }, + "operationId": "DiskAccesses_GetPrivateLinkResources", + "title": "List all possible private link resources under disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json new file mode 100644 index 0000000000..84c72434f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResource.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + } + }, + "operationId": "DiskAccesses_Get", + "title": "Get information about a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json new file mode 100644 index 0000000000..eeecafaebd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Get_GetInformationAboutADiskAccessResourceWithPrivateEndpoints.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "privateEndpointConnections": [ + { + "name": "myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + } + }, + "operationId": "DiskAccesses_Get", + "title": "Get information about a disk access resource with private endpoints." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json new file mode 100644 index 0000000000..374a60a552 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_List.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses?$skiptoken={token}", + "value": [ + { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + { + "name": "myDiskAccess2", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2", + "location": "westus", + "properties": { + "privateEndpointConnections": [ + { + "name": "myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2/privateEndpoinConnections/myDiskAccess2.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint2" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + ] + } + } + }, + "operationId": "DiskAccesses_List", + "title": "List all disk access resources in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json new file mode 100644 index 0000000000..cf7ad5a039 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListByResourceGroup.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses?$skiptoken={token}", + "value": [ + { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + { + "name": "myDiskAccess2", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2", + "location": "westus", + "properties": { + "privateEndpointConnections": [ + { + "name": "myDiskAccess.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess2/privateEndpoinConnections/myDiskAccess2.d4914cfa-6bc2-4049-a57c-3d1f622d8eef", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint2" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "provisioningState": "Succeeded", + "timeCreated": "2020-05-01T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + ] + } + } + }, + "operationId": "DiskAccesses_ListByResourceGroup", + "title": "List all disk access resources in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json new file mode 100644 index 0000000000..823e8f0394 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_ListPrivateEndpointConnections.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPrivateEndpointConnection", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnection", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "DiskAccesses_ListPrivateEndpointConnections", + "title": "Get information about a private endpoint connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json new file mode 100644 index 0000000000..94985020b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_Update.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccess": { + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + "diskAccessName": "myDiskAccess", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US", + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + } + }, + "202": { + "body": { + "name": "myDiskAccess", + "type": "Microsoft.Compute/diskAccesses", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourcegroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess", + "location": "West US", + "tags": { + "department": "Development", + "project": "PrivateEndpoints" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess?api-version=2021-04-01" + } + } + }, + "operationId": "DiskAccesses_Update", + "title": "Update a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json new file mode 100644 index 0000000000..aad18848a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskAccesses_UpdateAPrivateEndpointConnection.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskAccessName": "myDiskAccess", + "privateEndpointConnection": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Approving myPrivateEndpointConnection", + "status": "Approved" + } + } + }, + "privateEndpointConnectionName": "myPrivateEndpointConnection", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myPrivateEndpointConnectionName", + "type": "Microsoft.Compute/diskAccesses/PrivateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Approving myPrivateEndpointConnection", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myPrivateEndpointConenction", + "type": "Microsoft.Compute/diskAccesses/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/myDiskAccess/privateEndpoinConnections/myPrivateEndpointConnectionName", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint" + }, + "privateLinkServiceConnectionState": { + "description": "Approving myPrivateEndpointConnection", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "DiskAccesses_UpdateAPrivateEndpointConnection", + "title": "Approve a Private Endpoint Connection under a disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json new file mode 100644 index 0000000000..3adce78ee5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSet.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + } + }, + "operationId": "DiskEncryptionSets_CreateOrUpdate", + "title": "Create a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json new file mode 100644 index 0000000000..ddf6ab541d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentSubscription.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + } + } + }, + "operationId": "DiskEncryptionSets_CreateOrUpdate", + "title": "Create a disk encryption set with key vault from a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json new file mode 100644 index 0000000000..b2c7f7e6f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_CreateOrUpdate_CreateADiskEncryptionSetWithKeyVaultFromADifferentTenant.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {} + } + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "federatedClientId": "00000000-0000-0000-0000-000000000000" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {} + } + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "federatedClientId": "00000000-0000-0000-0000-000000000000", + "previousKeys": [] + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}": {} + } + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferenttenant.vault-int.azure-int.net/keys/{key}" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "federatedClientId": "00000000-0000-0000-0000-000000000000", + "previousKeys": [] + } + } + } + }, + "operationId": "DiskEncryptionSets_CreateOrUpdate", + "title": "Create a disk encryption set with key vault from a different tenant." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json new file mode 100644 index 0000000000..74d51b09b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "DiskEncryptionSets_Delete", + "title": "Delete a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json new file mode 100644 index 0000000000..c561a91fd5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSet.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + } + }, + "operationId": "DiskEncryptionSets_Get", + "title": "Get information about a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json new file mode 100644 index 0000000000..617a5be6d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Get_GetInformationAboutADiskEncryptionSetWhenAutoKeyRotationFailed.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "autoKeyRotationError": { + "code": "ManagedServiceIdentityNotFound", + "message": "Auto-key rotation was disabled as managed service identity associated with DiskEncryptionSet 'myDiskEncryptionSet' was not found. Please update the resource with correct identity to re-enable auto-key rotation." + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded", + "rotationToLatestKeyVersionEnabled": true + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + } + }, + "operationId": "DiskEncryptionSets_Get", + "title": "Get information about a disk encryption set when auto-key rotation failed." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json new file mode 100644 index 0000000000..ae2fb3ff89 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_List.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets?$skiptoken={token}", + "value": [ + { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + { + "name": "myDiskEncryptionSet2", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/mySecondResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet2", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/mySecondResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault2" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + ] + } + } + }, + "operationId": "DiskEncryptionSets_List", + "title": "List all disk encryption sets in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json new file mode 100644 index 0000000000..98a72a00cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListAssociatedResources.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources?$skiptoken={token}", + "value": [ + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + ] + } + } + }, + "operationId": "DiskEncryptionSets_ListAssociatedResources", + "title": "List all resources that are encrypted with this disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json new file mode 100644 index 0000000000..90a9d784ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_ListByResourceGroup.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets?$skiptoken={token}", + "value": [ + { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + { + "name": "myDiskEncryptionSet2", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet2", + "identity": { + "type": "SystemAssigned" + }, + "location": "westus", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault2" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [], + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + ] + } + } + }, + "operationId": "DiskEncryptionSets_ListByResourceGroup", + "title": "List all disk encryption sets in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json new file mode 100644 index 0000000000..98e9626e74 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSet.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey" + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "lastKeyRotationTimestamp": "2021-04-01T04:41:35.079872+00:00", + "previousKeys": [] + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/keyName/keyVersion", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + }, + "tags": { + "department": "Development", + "project": "Encryption" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet?api-version=2021-04-01" + } + } + }, + "operationId": "DiskEncryptionSets_Update", + "title": "Update a disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json new file mode 100644 index 0000000000..9d7372ecf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueSucceeded.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "rotationToLatestKeyVersionEnabled": true + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/KeyVersion2" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "lastKeyRotationTimestamp": "2021-04-01T04:41:35.079872+00:00", + "provisioningState": "Succeeded", + "rotationToLatestKeyVersionEnabled": true + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet?api-version=2021-04-01" + } + } + }, + "operationId": "DiskEncryptionSets_Update", + "title": "Update a disk encryption set with rotationToLatestKeyVersionEnabled set to true - Succeeded" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json new file mode 100644 index 0000000000..b284f35cae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskEncryptionSets_Update_UpdateADiskEncryptionSetWithRotationToLatestKeyVersionEnabledSetToTrueUpdating.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskEncryptionSet": { + "identity": { + "type": "SystemAssigned" + }, + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "rotationToLatestKeyVersionEnabled": true + } + }, + "diskEncryptionSetName": "myDiskEncryptionSet", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion2" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "lastKeyRotationTimestamp": "2021-04-01T04:41:35.079872+00:00", + "previousKeys": [ + { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + } + ], + "provisioningState": "Updating", + "rotationToLatestKeyVersionEnabled": true + } + } + }, + "202": { + "body": { + "name": "myDiskEncryptionSet", + "type": "Microsoft.Compute/diskEncryptionSets", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet", + "identity": { + "type": "SystemAssigned" + }, + "location": "West US", + "properties": { + "activeKey": { + "keyUrl": "https://myvaultdifferentsub.vault-int.azure-int.net/keys/keyName/keyVersion1" + }, + "encryptionType": "EncryptionAtRestWithCustomerKey", + "previousKeys": [] + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/myDiskEncryptionSet?api-version=2021-04-01" + } + } + }, + "operationId": "DiskEncryptionSets_Update", + "title": "Update a disk encryption set with rotationToLatestKeyVersionEnabled set to true - Updating" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json new file mode 100644 index 0000000000..cb701c24f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointResource.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "name": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "properties": { + "familyId": "996bf3ce-b6ff-4e86-9db6-dc27ea06cea5", + "hyperVGeneration": "V1", + "networkAccessPolicy": "AllowAll", + "osType": "Windows", + "publicNetworkAccess": "Disabled", + "sourceResourceId": "/subscriptions/d2260d06-e00d-422f-8b63-93df551a59ae/resourceGroups/rg0680fb0c-89f1-41b4-96c0-35733a181558/providers/Microsoft.Compute/disks/TestDisk45ceb03433006d1baee0", + "sourceUniqueId": "48e058b1-7eea-4968-b532-10a8a1130c13", + "timeCreated": "2020-09-16T04:41:35.079872+00:00" + } + } + } + }, + "operationId": "DiskRestorePoint_Get", + "title": "Get an incremental disk restorePoint resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json new file mode 100644 index 0000000000..575b6a5d64 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_Get_GetAnIncrementalDiskRestorePointWhenSourceResourceIsFromADifferentRegion.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "name": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "properties": { + "completionPercent": 100, + "familyId": "996bf3ce-b6ff-4e86-9db6-dc27ea06cea5", + "hyperVGeneration": "V1", + "networkAccessPolicy": "AllowAll", + "osType": "Windows", + "publicNetworkAccess": "Disabled", + "replicationState": "Succeeded", + "sourceResourceId": "/subscriptions/d2260d06-e00d-422f-8b63-93df551a59ae/resourceGroups/rg0680fb0c-89f1-41b4-96c0-35733a181558/providers/Microsoft.Compute/disks/TestDisk45ceb03433006d1baee0", + "sourceResourceLocation": "eastus2", + "sourceUniqueId": "48e058b1-7eea-4968-b532-10a8a1130c13", + "timeCreated": "2020-09-16T04:41:35.079872+00:00" + } + } + } + }, + "operationId": "DiskRestorePoint_Get", + "title": "Get an incremental disk restorePoint when source resource is from a different region" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json new file mode 100644 index 0000000000..3d51f32bb8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_GrantAccess.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "fileFormat": "VHDX" + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "DiskRestorePoint_GrantAccess", + "title": "Grants access to a diskRestorePoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json new file mode 100644 index 0000000000..7163599ed0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_ListByRestorePoint.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpc/restorePoints/vmrp/diskRestorePoints/TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "properties": { + "familyId": "996bf3ce-b6ff-4e86-9db6-dc27ea06cea5", + "hyperVGeneration": "V1", + "networkAccessPolicy": "AllowAll", + "osType": "Windows", + "publicNetworkAccess": "Disabled", + "sourceResourceId": "/subscriptions/d2260d06-e00d-422f-8b63-93df551a59ae/resourceGroups/rg0680fb0c-89f1-41b4-96c0-35733a181558/providers/Microsoft.Compute/disks/TestDisk45ceb03433006d1baee0", + "sourceUniqueId": "48e058b1-7eea-4968-b532-10a8a1130c13", + "timeCreated": "2020-09-16T04:41:35.079872+00:00" + } + } + ] + } + } + }, + "operationId": "DiskRestorePoint_ListByRestorePoint", + "title": "Get an incremental disk restorePoint resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json new file mode 100644 index 0000000000..5e505a0bdf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/DiskRestorePoint_RevokeAccess.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskRestorePointName": "TestDisk45ceb03433006d1baee0_b70cd924-3362-4a80-93c2-9415eaa12745", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpc", + "subscriptionId": "{subscription-id}", + "vmRestorePointName": "vmrp" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "DiskRestorePoint_RevokeAccess", + "title": "Revokes access to a diskRestorePoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json new file mode 100644 index 0000000000..944063ee34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAConfidentialVmSupportedDiskEncryptedWithCustomerManagedKey.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows", + "securityProfile": { + "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "secureVMDiskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}", + "securityType": "ConfidentialVM_DiskEncryptedWithCustomerKey" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a confidential VM supported disk encrypted with customer managed key" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json new file mode 100644 index 0000000000..1b7f8a7746 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskAccessResource.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskAccessId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/{existing-diskAccess-name}", + "diskSizeGB": 200, + "networkAccessPolicy": "AllowPrivate" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskAccessId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskAccesses/{existing-diskAccess-name}", + "diskSizeGB": 200, + "networkAccessPolicy": "AllowPrivate", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk and associate with disk access resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json new file mode 100644 index 0000000000..1c3626cf7d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskAndAssociateWithDiskEncryptionSet.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "encryption": { + "diskEncryptionSetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "encryption": { + "diskEncryptionSetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk and associate with disk encryption set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json new file mode 100644 index 0000000000..e3529f77f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByCopyingASnapshot.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk by copying a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json new file mode 100644 index 0000000000..0580cf3c0e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromADifferentSubscription.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk by importing an unmanaged blob from a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json new file mode 100644 index 0000000000..4dd4792137 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskByImportingAnUnmanagedBlobFromTheSameSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk by importing an unmanaged blob from the same subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json new file mode 100644 index 0000000000..14565636c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAPlatformImage.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "{sku}", + "product": "{offer}", + "publisher": "{publisher}" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/westus/Publishers/{publisher}/ArtifactTypes/VMImage/Offers/{offer}/Skus/{sku}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "purchasePlan": { + "name": "{sku}", + "product": "{offer}", + "publisher": "{publisher}" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from a platform image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json new file mode 100644 index 0000000000..b283d6566a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryCommunityImage.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "communityGalleryImageId": "/CommunityGalleries/{communityGalleryPublicGalleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an Azure Compute Gallery community image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json new file mode 100644 index 0000000000..6462a9c9bb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryDirectSharedImage.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "sharedGalleryImageId": "/SharedGalleries/{sharedGalleryUniqueName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an Azure Compute Gallery direct shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json new file mode 100644 index 0000000000..a18fca6ec1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnAzureComputeGalleryImage.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "osType": "Windows" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "FromImage", + "galleryImageReference": { + "id": "/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Providers/Microsoft.Compute/Galleries/{galleryName}/Images/{imageName}/Versions/1.0.0" + } + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": true + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an Azure Compute Gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json new file mode 100644 index 0000000000..4154763887 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromAnExistingManagedDiskInTheSameOrDifferentSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1" + } + } + }, + "diskName": "myDisk2", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk2", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk2", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk1" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from an existing managed disk in the same or different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json new file mode 100644 index 0000000000..eade2487b6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromElasticSanVolumeSnapshot.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from elastic san volume snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json new file mode 100644 index 0000000000..c3bb0f701f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromImportSecureCreateOption.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "ImportSecure", + "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "osType": "Windows", + "securityProfile": { + "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "ImportSecure", + "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "ImportSecure", + "securityDataUri": "https://mystorageaccount.blob.core.windows.net/osimages/vmgs.vhd", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "securityType": "ConfidentialVM_VMGuestStateOnlyEncryptedWithPlatformKey" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from ImportSecure create option" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json new file mode 100644 index 0000000000..7fc1824b1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskFromUploadPreparedSecureCreateOption.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "UploadPreparedSecure", + "uploadSizeBytes": 10737418752 + }, + "osType": "Windows", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "UploadPreparedSecure", + "uploadSizeBytes": 10737418752 + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "UploadPreparedSecure", + "uploadSizeBytes": 10737418752 + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk from UploadPreparedSecure create option" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json new file mode 100644 index 0000000000..47cf7d0512 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithDataAccessAuthMode.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "dataAccessAuthMode": "AzureActiveDirectory", + "diskSizeGB": 200 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "dataAccessAuthMode": "AzureActiveDirectory", + "diskSizeGB": 200, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with dataAccessAuthMode" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json new file mode 100644 index 0000000000..06671ff1c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithOptimizedForFrequentAttach.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": true + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": true, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": true, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with optimizedForFrequentAttach." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json new file mode 100644 index 0000000000..9c269a6d5e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPerformancePlus.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "performancePlus": true + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "performancePlus": true + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "performancePlus": true + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with performancePlus." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json new file mode 100644 index 0000000000..ae5b5719de --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithPremiumV2AccountType.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskIOPSReadWrite": 125, + "diskMBpsReadWrite": 3000, + "diskSizeGB": 200 + }, + "sku": { + "name": "PremiumV2_LRS" + } + }, + "diskName": "myPremiumV2Disk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myPremiumV2Disk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "PremiumV2_LRS", + "tier": "Premium" + } + } + }, + "202": { + "body": { + "name": "myPremiumV2Disk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "PremiumV2_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with premium v2 account type." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json new file mode 100644 index 0000000000..63d003b932 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSecurityProfile.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "North Central US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "osType": "Windows", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "North Central US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "North Central US", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "osType": "Windows", + "provisioningState": "Updating", + "securityProfile": { + "securityType": "TrustedLaunch" + } + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with security profile" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json new file mode 100644 index 0000000000..3090b3ea1e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithSsdZrsAccountType.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200 + }, + "sku": { + "name": "Premium_ZRS" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "Premium_ZRS", + "tier": "Premium" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "Premium_ZRS", + "tier": "Premium" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with ssd zrs account type." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json new file mode 100644 index 0000000000..887b8ed892 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedDiskWithUltraAccountTypeWithReadOnlyPropertySet.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 4096 + }, + "diskIOPSReadWrite": 125, + "diskMBpsReadWrite": 3000, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + } + }, + "sku": { + "name": "UltraSSD_LRS" + } + }, + "diskName": "myUltraReadOnlyDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myUltraReadOnlyDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + }, + "202": { + "body": { + "name": "myUltraReadOnlyDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed disk with ultra account type with readOnly property set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json new file mode 100644 index 0000000000..5f73d251fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAManagedUploadDisk.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "uploadSizeBytes": 10737418752 + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "uploadSizeBytes": 10737418752 + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Upload", + "uploadSizeBytes": 10737418752 + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create a managed upload disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json new file mode 100644 index 0000000000..a43182ccac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDisk.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create an empty managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json new file mode 100644 index 0000000000..1895970f3b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnEmptyManagedDiskInExtendedLocation.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "extendedLocation": { + "name": "{edge-zone-id}", + "type": "EdgeZone" + }, + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "extendedLocation": { + "name": "{edge-zone-id}", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "extendedLocation": { + "name": "{edge-zone-id}", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create an empty managed disk in extended location." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json new file mode 100644 index 0000000000..b06d88f594 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_CreateOrUpdate_CreateAnUltraManagedDiskWithLogicalSectorSize_512E.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 512 + }, + "diskSizeGB": 200 + }, + "sku": { + "name": "UltraSSD_LRS" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 512 + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty", + "logicalSectorSize": 512 + }, + "diskSizeGB": 200, + "provisioningState": "Updating" + }, + "sku": { + "name": "UltraSSD_LRS", + "tier": "Ultra" + } + } + } + }, + "operationId": "Disks_CreateOrUpdate", + "title": "Create an ultra managed disk with logicalSectorSize 512E" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json new file mode 100644 index 0000000000..4bee09d130 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "Disks_Delete", + "title": "Delete a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json new file mode 100644 index 0000000000..e264a816e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Get.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myManagedDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myManagedDisk", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "managedBy": "/subscriptions/123caaa-123v-v211-a49f-f88ccac5bf88/resourceGroups/ResourceGroupName/providers/Microsoft.Compute/virtualMachines/TestVM414689371c88843d65ec", + "properties": { + "LastOwnershipUpdateTime": "2016-12-28T04:41:35.079872+00:00", + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 10, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "test_sku", + "product": "marketplace_vm_test", + "publisher": "test_test_pmc2pc1" + }, + "securityProfile": { + "securityType": "TrustedLaunch" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "supportsHibernation": true, + "timeCreated": "2016-12-28T04:41:35.079872+00:00" + }, + "sku": { + "name": "Standard_LRS" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + } + } + }, + "operationId": "Disks_Get", + "title": "Get information about a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json new file mode 100644 index 0000000000..89093228c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetASasOnAManagedDisk.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "fileFormat": "VHD" + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Disks_GrantAccess", + "title": "Get a sas on a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json new file mode 100644 index 0000000000..aaef7390c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_GrantAccess_GetSasOnManagedDiskAndVmGuestState.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "getSecureVMGuestStateSAS": true + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r", + "securityDataAccessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/b9bf5824-6122-49e0-ba22-042f76ccd8a1_vmgs?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Disks_GrantAccess", + "title": "Get sas on managed disk and VM guest state" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json new file mode 100644 index 0000000000..b433b07100 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_List.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://disksvchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/Disks/myManagedDisk", + "value": [ + { + "name": "myManagedDisk1", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:35.9278721+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + }, + { + "name": "myManagedDisk2", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 10, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.872242+00:00" + } + }, + { + "name": "myManagedDisk3", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk3", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.3973934+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + } + ] + } + } + }, + "operationId": "Disks_List", + "title": "List all managed disks in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json new file mode 100644 index 0000000000..254320b196 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_ListByResourceGroup.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://disksvchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/Disks/myManagedDisk", + "value": [ + { + "name": "myManagedDisk1", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:35.9278721+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + }, + { + "name": "myManagedDisk2", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 10, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.872242+00:00" + } + }, + { + "name": "myManagedDisk3", + "type": "Microsoft.Compute/disks", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscriptionId}/Providers/Microsoft.Compute/Locations/uswest/Publishers/Microsoft/ArtifactTypes/VMImage/Offers/{offer}" + } + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:36.3973934+00:00" + }, + "tags": { + "department": "Development", + "project": "ManagedDisks" + } + } + ] + } + } + }, + "operationId": "Disks_ListByResourceGroup", + "title": "List all managed disks in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json new file mode 100644 index 0000000000..df191dfc39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_RevokeAccess.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Disks_RevokeAccess", + "title": "Revoke access to a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json new file mode 100644 index 0000000000..b2b2cd3637 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_CreateOrUpdateABurstingEnabledManagedDisk.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "burstingEnabled": true, + "diskSizeGB": 1024 + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "burstingEnabled": true, + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 1024, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 1024, + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Create or update a bursting enabled managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json new file mode 100644 index 0000000000..21e31b2be3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddAcceleratedNetworking.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportedCapabilities": { + "acceleratedNetwork": false + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add accelerated networking." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json new file mode 100644 index 0000000000..6ae1fc40cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddArchitecture.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportedCapabilities": { + "architecture": "Arm64" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "architecture": "Arm64" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "architecture": "Arm64" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-12-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add architecture." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json new file mode 100644 index 0000000000..2b5981fe03 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddPurchasePlan.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "purchasePlan": { + "name": "myPurchasePlanName", + "product": "myPurchasePlanProduct", + "promotionCode": "myPurchasePlanPromotionCode", + "publisher": "myPurchasePlanPublisher" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "myPurchasePlanName", + "product": "myPurchasePlanProduct", + "promotionCode": "myPurchasePlanPromotionCode", + "publisher": "myPurchasePlanPublisher" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/test_test_pmc2pc1/ArtifactTypes/VMImage/Offers/marketplace_vm_test/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "purchasePlan": { + "name": "myPurchasePlanName", + "product": "myPurchasePlanProduct", + "promotionCode": "myPurchasePlanPromotionCode", + "publisher": "myPurchasePlanPublisher" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add purchase plan." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json new file mode 100644 index 0000000000..ab444fccfb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToAddSupportsHibernation.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportsHibernation": true + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportsHibernation": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportsHibernation": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to add supportsHibernation." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json new file mode 100644 index 0000000000..23693ac412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToChangeTier.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "tier": "P30" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "provisioningState": "Succeeded", + "tier": "P30" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "propertyUpdatesInProgress": { + "targetTier": "P30" + }, + "provisioningState": "Updating", + "tier": "P10" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to change tier." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json new file mode 100644 index 0000000000..28a061e1c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableBursting.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "burstingEnabled": false + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to disable bursting." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json new file mode 100644 index 0000000000..d99cf20a92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskToDisableOptimizedForFrequentAttach.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "optimizedForFrequentAttach": false + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": false, + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "optimizedForFrequentAttach": false, + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk to disable optimizedForFrequentAttach." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json new file mode 100644 index 0000000000..b04c0c2d19 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateAManagedDiskWithDiskControllerTypes.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "supportedCapabilities": { + "diskControllerTypes": "SCSI" + } + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/marketplacetestfirstparty/ArtifactTypes/VMImage/Offers/nvme_test_062/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "supportedCapabilities": { + "diskControllerTypes": "SCSI" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "westus", + "properties": { + "creationData": { + "createOption": "FromImage", + "imageReference": { + "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/westus/Publishers/marketplacetestfirstparty/ArtifactTypes/VMImage/Offers/nvme_test_062/Skus/test_sku/Versions/1.0.0" + } + }, + "diskSizeGB": 127, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Updating", + "supportedCapabilities": { + "diskControllerTypes": "SCSI" + } + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2023-04-02" + } + } + }, + "operationId": "Disks_Update", + "title": "Update a managed disk with diskControllerTypes." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json new file mode 100644 index 0000000000..0afa8f91a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Disks_Update_UpdateManagedDiskToRemoveDiskAccessResourceAssociation.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "disk": { + "properties": { + "networkAccessPolicy": "AllowAll" + } + }, + "diskName": "myDisk", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "networkAccessPolicy": "AllowAll", + "provisioningState": "Succeeded" + } + } + }, + "202": { + "body": { + "name": "myDisk", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Empty" + }, + "diskSizeGB": 200, + "networkAccessPolicy": "AllowAll", + "provisioningState": "Updating" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk?api-version=2021-04-01" + } + } + }, + "operationId": "Disks_Update", + "title": "Update managed disk to remove disk access resource association." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json new file mode 100644 index 0000000000..70da204d00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateACommunityGallery.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "communityGalleryInfo": { + "eula": "eula", + "publicNamePrefix": "PirPublic", + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + } + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create a community gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json new file mode 100644 index 0000000000..1f6036ad7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGallery.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description." + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating" + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create or update a simple gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json new file mode 100644 index 0000000000..fb436244ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSharingProfile.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "sharingProfile": { + "permissions": "Groups" + } + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "permissions": "Groups" + } + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "sharingProfile": { + "permissions": "Groups" + } + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "sharingProfile": { + "permissions": "Groups" + } + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create or update a simple gallery with sharing profile." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json new file mode 100644 index 0000000000..59b58b2d72 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_CreateOrUpdate_CreateOrUpdateASimpleGalleryWithSoftDeletionEnabled.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + } + }, + "201": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Creating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + } + }, + "202": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating", + "softDeletePolicy": { + "isSoftDeleteEnabled": true + } + } + } + } + }, + "operationId": "Galleries_CreateOrUpdate", + "title": "Create or update a simple gallery with soft deletion enabled." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json new file mode 100644 index 0000000000..da9a6c6ce6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "Galleries_Delete", + "title": "Delete a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json new file mode 100644 index 0000000000..c6349f1ee9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetACommunityGallery.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded", + "sharingProfile": { + "communityGalleryInfo": { + "communityGalleryEnabled": true, + "eula": "eula", + "publicNames": [ + "GalelryPublicName" + ], + "publisherContact": "pir@microsoft.com", + "publisherUri": "uri" + }, + "permissions": "Community" + }, + "sharingStatus": { + "aggregatedState": "Succeeded", + "summary": [ + { + "region": "westus", + "state": "Succeeded", + "details": "" + } + ] + } + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a community gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json new file mode 100644 index 0000000000..c903a11386 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGallery.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json new file mode 100644 index 0000000000..48675a54c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithExpandSharingProfileGroups.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "$expand": "SharingProfile/Groups", + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "sharingProfile": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "permissions": "Groups" + } + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a gallery with expand sharingProfile groups." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json new file mode 100644 index 0000000000..9e1c8f4628 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Get_GetAGalleryWithSelectPermissions.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "$select": "Permissions", + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "sharingProfile": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "permissions": "Groups" + } + } + } + } + }, + "operationId": "Galleries_Get", + "title": "Get a gallery with select permissions." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json new file mode 100644 index 0000000000..4541c94943 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_List.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/galleries?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName", + "value": [ + { + "name": "myGalleryName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "Galleries_List", + "title": "List galleries in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json new file mode 100644 index 0000000000..c115ef0133 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName", + "value": [ + { + "name": "myGalleryName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "Galleries_ListByResourceGroup", + "title": "List galleries in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json new file mode 100644 index 0000000000..afca95d9ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Galleries_Update.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "gallery": { + "properties": { + "description": "This is the gallery description." + } + }, + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "location": "West US", + "properties": { + "description": "This is the gallery description.", + "identifier": { + "uniqueName": "{subscription-id}-MYGALLERYNAME" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Galleries_Update", + "title": "Update a simple gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..aadf2a7c29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_CreateOrUpdate.json @@ -0,0 +1,233 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "endOfLifeDate": "2019-07-01T07:00:00Z", + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + }, + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "advancedSettings": { + "timeout": "300", + "user": "root" + }, + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "settings": { + "configFileName": "configuration.cfg", + "packageFileName": "package.zip" + }, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "advancedSettings": { + "timeout": "300", + "user": "root" + }, + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "settings": { + "configFileName": "configuration.cfg", + "packageFileName": "package.zip" + }, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_CreateOrUpdate", + "title": "Create or update a simple gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json new file mode 100644 index 0000000000..1d5a65f41b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryApplicationVersions_Delete", + "title": "Delete a gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json new file mode 100644 index 0000000000..b335b07d65 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersion.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_Get", + "title": "Get a gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json new file mode 100644 index 0000000000..aff5abc920 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Get_GetAGalleryApplicationVersionWithReplicationStatus.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "$expand": "ReplicationStatus", + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "advancedSettings": { + "timeout": "300", + "user": "root" + }, + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "settings": { + "configFileName": "configuration.cfg", + "packageFileName": "package.zip" + }, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "replicationStatus": { + "aggregatedState": "Completed", + "summary": [ + { + "progress": 100, + "region": "West US", + "state": "Completed", + "details": "" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_Get", + "title": "Get a gallery Application Version with replication status." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json new file mode 100644 index 0000000000..60e2538687 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_ListByGalleryApplication.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName/versions?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/applications/myGalleryApplicationName/versions/myGalleryApplicationVersionName", + "value": [ + { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + ] + } + } + }, + "operationId": "GalleryApplicationVersions_ListByGalleryApplication", + "title": "List gallery Application Versions in a gallery Application Definition." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json new file mode 100644 index 0000000000..f5ce2ddf2a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplicationVersions_Update.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryApplicationVersion": { + "properties": { + "publishingProfile": { + "endOfLifeDate": "2019-07-01T07:00:00Z", + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + }, + "galleryApplicationVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "type": "Microsoft.Compute/galleries/applications/versions", + "id": "/subscriptions/01523d7c-60da-455e-adef-521b547922c4/resourceGroups/galleryPsTestRg98/providers/Microsoft.Compute/galleries/galleryPsTestGallery6165/applications/galleryPsTestGalleryApplication7825/versions/1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "enableHealthCheck": false, + "endOfLifeDate": "2019-07-01T07:00:00+00:00", + "excludeFromLatest": false, + "manageActions": { + "install": "powershell -command \"Expand-Archive -Path package.zip -DestinationPath C:\\package\"", + "remove": "del C:\\package " + }, + "publishedDate": "2019-06-21T17:13:57.5972568+00:00", + "replicaCount": 1, + "source": { + "mediaLink": "https://mystorageaccount.blob.core.windows.net/mycontainer/package.zip?{sasKey}" + }, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + } + } + } + } + }, + "operationId": "GalleryApplicationVersions_Update", + "title": "Update a simple gallery Application Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json new file mode 100644 index 0000000000..896db739b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_CreateOrUpdate.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplication": { + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + }, + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + }, + "201": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + }, + "202": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + } + }, + "operationId": "GalleryApplications_CreateOrUpdate", + "title": "Create or update a simple gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json new file mode 100644 index 0000000000..9cb21becdd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryApplications_Delete", + "title": "Delete a gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json new file mode 100644 index 0000000000..272aa6b4c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Get.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + } + }, + "operationId": "GalleryApplications_Get", + "title": "Get a gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json new file mode 100644 index 0000000000..b5e4742407 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_ListByGallery.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/applications/myGalleryApplicationName", + "value": [ + { + "name": "myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + ] + } + } + }, + "operationId": "GalleryApplications_ListByGallery", + "title": "List gallery Applications in a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json new file mode 100644 index 0000000000..c1b90d0ebe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryApplications_Update.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryApplication": { + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + }, + "galleryApplicationName": "myGalleryApplicationName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryApplicationName", + "type": "Microsoft.Compute/galleries", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/applications/myGalleryApplicationName", + "location": "West US", + "properties": { + "description": "This is the gallery application description.", + "customActions": [ + { + "name": "myCustomAction", + "description": "This is the custom action description.", + "parameters": [ + { + "name": "myCustomActionParameter", + "type": "String", + "description": "This is the description of the parameter", + "defaultValue": "default value of parameter.", + "required": false + } + ], + "script": "myCustomActionScript" + } + ], + "eula": "This is the gallery application EULA.", + "privacyStatementUri": "myPrivacyStatementUri}", + "releaseNoteUri": "myReleaseNoteUri", + "supportedOSType": "Windows" + } + } + } + }, + "operationId": "GalleryApplications_Update", + "title": "Update a simple gallery Application." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json new file mode 100644 index 0000000000..1979877695 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingCommunityGalleryImageAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "communityGalleryImageId": "/communityGalleries/{communityGalleryName}/images/{communityGalleryImageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using community gallery image as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json new file mode 100644 index 0000000000..3006bf1930 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingManagedImageAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using managed image as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json new file mode 100644 index 0000000000..c7cc577b7b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingMixOfDisksAndSnapshotsAsASource.json @@ -0,0 +1,313 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using mix of disks and snapshots as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json new file mode 100644 index 0000000000..5311aab071 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingShallowReplicationMode.json @@ -0,0 +1,184 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "replicationMode": "Shallow", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1 + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "replicationMode": "Shallow", + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "replicationMode": "Shallow", + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "replicationMode": "Shallow", + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using shallow replication mode." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json new file mode 100644 index 0000000000..dbed8d6508 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSharedImageAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/galleries/{galleryName}/images/{imageDefinitionName}/versions/{versionName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using shared image as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json new file mode 100644 index 0000000000..0c06684b50 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingSnapshotsAsASource.json @@ -0,0 +1,313 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{dataDiskName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{osSnapshotName}" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using snapshots as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json new file mode 100644 index 0000000000..cbf0f5b676 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVhdAsASource.json @@ -0,0 +1,271 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using vhd as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json new file mode 100644 index 0000000000..5f8d3a3ee4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionUsingVmAsSource.json @@ -0,0 +1,324 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/{vmName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple Gallery Image Version using VM as source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json new file mode 100644 index 0000000000..659c83beeb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_CreateOrUpdate_CreateOrUpdateASimpleGalleryImageVersionWithTargetExtendedLocationsSpecified.json @@ -0,0 +1,366 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "location": "West US", + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetExtendedLocations": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 0 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "extendedLocation": { + "name": "microsoftlosangeles1", + "type": "EdgeZone" + }, + "extendedLocationReplicaCount": 1, + "storageAccountType": "StandardSSD_LRS(default)" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 0 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "extendedLocation": { + "name": "microsoftnewyork1", + "type": "EdgeZone" + }, + "extendedLocationReplicaCount": 1, + "storageAccountType": "StandardSSD_LRS(default)" + } + ], + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "201": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Creating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + }, + "202": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherWestUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myWestUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherEastUSDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myEastUSDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_CreateOrUpdate", + "title": "Create or update a simple gallery image version with target extended locations specified." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json new file mode 100644 index 0000000000..b49696048e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Delete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryImageVersions_Delete", + "title": "Delete a gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json new file mode 100644 index 0000000000..65622b19f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersion.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json new file mode 100644 index 0000000000..9504fcf105 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithReplicationStatus.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "$expand": "ReplicationStatus", + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "replicationStatus": { + "aggregatedState": "Completed", + "summary": [ + { + "progress": 100, + "region": "West US", + "state": "Completed", + "details": "" + }, + { + "progress": 100, + "region": "East US", + "state": "Completed", + "details": "" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version with replication status." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json new file mode 100644 index 0000000000..573cf3ddd9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithSnapshotsAsASource.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{diskSnapshotName}" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/snapshots/{snapshotName}" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version with snapshots as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json new file mode 100644 index 0000000000..58b018a40b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Get_GetAGalleryImageVersionWithVhdAsASource.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/{storageAccount}", + "uri": "https://gallerysourcencus.blob.core.windows.net/myvhds/Windows-Server-2012-R2-20171216-en.us-128GB.vhd" + } + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Get", + "title": "Get a gallery image version with vhd as a source." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json new file mode 100644 index 0000000000..0d9b5f6cbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_ListByGalleryImage.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images/myGalleryImageName/versions?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/images/myGalleryImageName/versions/myGalleryImageVersionName", + "value": [ + { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Succeeded", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myOtherDiskEncryptionSet", + "lun": 0 + }, + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_LRS" + } + ] + }, + "safetyProfile": { + "allowDeletionOfReplicatedLocations": false, + "policyViolations": [ + { + "category": "ImageFlaggedUnsafe", + "details": "This is the policy violation details." + } + ], + "reportedForPolicyViolation": true + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + ] + } + } + }, + "operationId": "GalleryImageVersions_ListByGalleryImage", + "title": "List gallery image versions in a gallery image definition." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json new file mode 100644 index 0000000000..e87603aa35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionManagedImageAsSource.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": { + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Update", + "title": "Update a simple Gallery Image Version (Managed Image as source)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json new file mode 100644 index 0000000000..9f644b59ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImageVersions_Update_UpdateASimpleGalleryImageVersionWithoutSourceId.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersion": { + "properties": { + "publishingProfile": { + "targetRegions": [ + { + "name": "West US", + "regionalReplicaCount": 1 + }, + { + "name": "East US", + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": {} + } + }, + "galleryImageVersionName": "1.0.0", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "1.0.0", + "location": "West US", + "properties": { + "provisioningState": "Updating", + "publishingProfile": { + "publishedDate": "2018-01-01T00:00:00Z", + "replicaCount": 1, + "storageAccountType": "Standard_LRS", + "targetRegions": [ + { + "name": "West US", + "encryption": { + "dataDiskImages": [ + { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet", + "lun": 1 + } + ], + "osDiskImage": { + "diskEncryptionSetId": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSet/myDiskEncryptionSet" + } + }, + "excludeFromLatest": false, + "regionalReplicaCount": 1, + "storageAccountType": "Standard_LRS" + }, + { + "name": "East US", + "excludeFromLatest": false, + "regionalReplicaCount": 2, + "storageAccountType": "Standard_ZRS" + } + ] + }, + "storageProfile": { + "dataDiskImages": [ + { + "hostCaching": "None", + "lun": 1, + "sizeInGB": 10 + } + ], + "osDiskImage": { + "hostCaching": "ReadOnly", + "sizeInGB": 10 + }, + "source": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/images/{imageName}" + } + } + } + } + } + }, + "operationId": "GalleryImageVersions_Update", + "title": "Update a simple Gallery Image Version without source id." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json new file mode 100644 index 0000000000..e8538ffb75 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_CreateOrUpdate.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImage": { + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + }, + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Updating" + } + } + }, + "201": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Creating" + } + } + }, + "202": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Updating" + } + } + } + }, + "operationId": "GalleryImages_CreateOrUpdate", + "title": "Create or update a simple gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json new file mode 100644 index 0000000000..8e6980198d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + }, + "operationId": "GalleryImages_Delete", + "title": "Delete a gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json new file mode 100644 index 0000000000..04a0f66ffc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Get.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "GalleryImages_Get", + "title": "Get a gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json new file mode 100644 index 0000000000..b16b7b97f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_ListByGallery.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/images?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/galleries/myGalleryName/images/myGalleryImageName", + "value": [ + { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "GalleryImages_ListByGallery", + "title": "List gallery images in a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json new file mode 100644 index 0000000000..0b7d699f63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GalleryImages_Update.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImage": { + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + }, + "galleryImageName": "myGalleryImageName", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "location": "West US", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "provisioningState": "Updating" + } + } + } + }, + "operationId": "GalleryImages_Update", + "title": "Update a simple gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json new file mode 100644 index 0000000000..efdd1e6cd5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_AddSharingIdToTheSharingProfileOfAGallery.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "sharingUpdate": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "operationType": "Add" + }, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "operationType": "Add" + } + }, + "202": { + "body": { + "groups": [ + { + "type": "Subscriptions", + "ids": [ + "34a4ab42-0d72-47d9-bd1a-aed207386dac", + "380fd389-260b-41aa-bad9-0a83108c370b" + ] + }, + { + "type": "AADTenants", + "ids": [ + "c24c76aa-8897-4027-9b03-8f7928b54ff6" + ] + } + ], + "operationType": "Add" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/share?api-version=2022-03-03" + } + } + }, + "operationId": "GallerySharingProfile_Update", + "title": "Add sharing id to the sharing profile of a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json new file mode 100644 index 0000000000..0b3a0e43ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ResetSharingProfileOfAGallery.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "sharingUpdate": { + "operationType": "Reset" + }, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "operationType": "Reset" + } + }, + "202": { + "body": { + "operationType": "Reset" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/share?api-version=2022-03-03" + } + } + }, + "operationId": "GallerySharingProfile_Update", + "title": "reset sharing profile of a gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json new file mode 100644 index 0000000000..15ee00a1b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/GallerySharingProfile_Update_ShareAGalleryToCommunity.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryName": "myGalleryName", + "resourceGroupName": "myResourceGroup", + "sharingUpdate": { + "operationType": "EnableCommunity" + }, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "operationType": "EnableCommunity" + } + }, + "202": { + "body": { + "operationType": "EnableCommunity" + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/share?api-version=2022-03-03" + } + } + }, + "operationId": "GallerySharingProfile_Update", + "title": "share a gallery to community." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json new file mode 100644 index 0000000000..0e5136b1a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlob.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a blob." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json new file mode 100644 index 0000000000..0bbdadac58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromABlobWithDiskEncryptionSetResource.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a blob with DiskEncryptionSet resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json new file mode 100644 index 0000000000..a8af1a35c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDisk.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json new file mode 100644 index 0000000000..af9accc0f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAManagedDiskWithDiskEncryptionSetResource.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + } + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a managed disk with DiskEncryptionSet resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json new file mode 100644 index 0000000000..2a4501c411 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshot.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": false + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json new file mode 100644 index 0000000000..57108191e5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromASnapshotWithDiskEncryptionSetResource.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "osDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + } + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from a snapshot with DiskEncryptionSet resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json new file mode 100644 index 0000000000..c6fd417bda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageFromAnExistingVirtualMachine.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + }, + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myVM_OsDisk_1_6dc293b7d811433196903acf92665022" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + }, + "storageProfile": { + "dataDisks": [], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myVM_OsDisk_1_6dc293b7d811433196903acf92665022" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image from an existing virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json new file mode 100644 index 0000000000..b674a65bfa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromABlob.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1 + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1 + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1 + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image that includes a data disk from a blob." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json new file mode 100644 index 0000000000..329ad24fc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromAManagedDisk.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + } + } + ], + "osDisk": { + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "managedDisk": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk" + }, + "osState": "Generalized", + "osType": "Linux" + }, + "zoneResilient": false + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image that includes a data disk from a managed disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json new file mode 100644 index 0000000000..a5a2735119 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_CreateOrUpdate_CreateAVirtualMachineImageThatIncludesADataDiskFromASnapshot.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "location": "West US", + "properties": { + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + } + } + ], + "osDisk": { + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": true + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": true + } + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscription-id}/resourceGroups/disk/providers/Microsoft.Compute/images/myImage", + "location": "westus", + "properties": { + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "lun": 1, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + } + } + ], + "osDisk": { + "caching": "ReadWrite", + "osState": "Generalized", + "osType": "Linux", + "snapshot": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_CreateOrUpdate", + "title": "Create a virtual machine image that includes a data disk from a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json new file mode 100644 index 0000000000..7b76bba3a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "Images_Delete", + "title": "Image_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json new file mode 100644 index 0000000000..189e5b5165 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Delete_ImageDeleteMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "Images_Delete", + "title": "Image_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json new file mode 100644 index 0000000000..5254979e4f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Get.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskSizeGB": 20, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + }, + "zoneResilient": true + } + } + } + } + }, + "operationId": "Images_Get", + "title": "Get information about a virtual machine image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json new file mode 100644 index 0000000000..b9983fc3d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_List.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/UserVMImages/myImageName", + "value": [ + { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + ] + } + } + }, + "operationId": "Images_List", + "title": "List all virtual machine images in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json new file mode 100644 index 0000000000..486c2c0e62 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_ListByResourceGroup.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images?$skiptoken={token}/Subscriptions/{subscriptionId}/ResourceGroups/myResourceGroup/UserVMImages/myImageName", + "value": [ + { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + ] + } + } + }, + "operationId": "Images_ListByResourceGroup", + "title": "List all virtual machine images in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json new file mode 100644 index 0000000000..aec85cbfcf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Images_Update.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "imageName": "myImage", + "parameters": { + "properties": { + "hyperVGeneration": "V1", + "sourceVirtualMachine": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + }, + "tags": { + "department": "HR" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskSizeGB": 20, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + }, + "zoneResilient": true + } + }, + "tags": { + "department": "HR" + } + } + }, + "201": { + "body": { + "name": "myImage", + "type": "Microsoft.Compute/images", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/myImage", + "location": "West US", + "properties": { + "provisioningState": "created", + "storageProfile": { + "dataDisks": [ + { + "blobUri": "https://mystorageaccount.blob.core.windows.net/dataimages/dataimage.vhd", + "lun": 1, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk2" + }, + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2" + }, + "storageAccountType": "Standard_LRS" + } + ], + "osDisk": { + "blobUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "diskSizeGB": 20, + "managedDisk": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myManagedDisk1" + }, + "osState": "Generalized", + "osType": "Windows", + "snapshot": { + "id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "storageAccountType": "Standard_LRS" + }, + "zoneResilient": true + } + }, + "tags": { + "department": "HR" + } + } + } + }, + "operationId": "Images_Update", + "title": "Updates tags of an Image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..6388082aab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_CreateOrUpdate.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard" + }, + "zones": [ + "1" + ] + }, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard" + }, + "zones": [ + "1" + ] + } + }, + "201": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard" + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ProximityPlacementGroups_CreateOrUpdate", + "title": "Create or Update a proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json new file mode 100644 index 0000000000..ecb5a67f47 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "ProximityPlacementGroups_Delete", + "title": "Delete a proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json new file mode 100644 index 0000000000..9673e94f9b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "availabilitySets": [ + { + "id": "string" + } + ], + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard", + "virtualMachineScaleSets": [ + { + "id": "string" + } + ], + "virtualMachines": [ + { + "id": "string" + } + ] + }, + "zones": [ + "1" + ] + } + } + }, + "operationId": "ProximityPlacementGroups_Get", + "title": "Get proximity placement groups." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json new file mode 100644 index 0000000000..9949e177b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListByResourceGroup.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "availabilitySets": [ + { + "id": "string" + } + ], + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard", + "virtualMachineScaleSets": [ + { + "id": "string" + } + ], + "virtualMachines": [ + { + "id": "string" + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "ProximityPlacementGroups_ListByResourceGroup", + "title": "List proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json new file mode 100644 index 0000000000..b3ce6a043f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_ListBySubscription.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "availabilitySets": [ + { + "id": "string" + } + ], + "intent": { + "vmSizes": [ + "Basic_A0", + "Basic_A2" + ] + }, + "proximityPlacementGroupType": "Standard", + "virtualMachineScaleSets": [ + { + "id": "string" + } + ], + "virtualMachines": [ + { + "id": "string" + } + ] + }, + "zones": [ + "1" + ] + } + ] + } + } + }, + "operationId": "ProximityPlacementGroups_ListBySubscription", + "title": "List proximity placement groups." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json new file mode 100644 index 0000000000..f3325aa97c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/ProximityPlacementGroups_Update.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "tags": { + "additionalProp1": "string" + } + }, + "proximityPlacementGroupName": "myProximityPlacementGroup", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myProximityPlacementGroup", + "type": "Microsoft.Compute/proximityPlacementGroups", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/myProximityPlacementGroup", + "location": "westus", + "properties": { + "proximityPlacementGroupType": "Standard" + } + } + } + }, + "operationId": "ProximityPlacementGroups_Update", + "title": "Update a proximity placement group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json new file mode 100644 index 0000000000..a423031311 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollection.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "norwayeast", + "properties": { + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "myRpc", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + }, + "201": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_CreateOrUpdate", + "title": "Create or update a restore point collection." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json new file mode 100644 index 0000000000..be183a100c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_CreateOrUpdate_CreateOrUpdateARestorePointCollectionForCrossRegionCopy.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "norwayeast", + "properties": { + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "myRpc", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + }, + "201": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "source": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_CreateOrUpdate", + "title": "Create or update a restore point collection for cross region copy." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json new file mode 100644 index 0000000000..4c32c448d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePointCollections_Delete", + "title": "RestorePointCollection_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json new file mode 100644 index 0000000000..98cd85dd27 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Delete_RestorePointCollectionDeleteMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePointCollections_Delete", + "title": "RestorePointCollection_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json new file mode 100644 index 0000000000..ed254c6e30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionButNotTheRestorePointsContainedInTheRestorePointCollection.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "myRpc", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_Get", + "title": "Get a restore point collection (but not the restore points contained in the restore point collection)" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json new file mode 100644 index 0000000000..b1ee85bff6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Get_GetARestorePointCollectionIncludingTheRestorePointsContainedInTheRestorePointCollection.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "restorePoints", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "rpcName", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "restorePoints": [ + { + "name": "restorePointName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f" + } + ], + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + ], + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "RestorePointCollections_Get", + "title": "Get a restore point collection, including the restore points contained in the restore point collection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json new file mode 100644 index 0000000000..889f09c9cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_List.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "restorePointCollection1", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection1", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection1", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + { + "name": "restorePointCollection2", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection2", + "location": "westus", + "properties": { + "provisioningState": "Deleting", + "restorePointCollectionId": "2875c590-e337-4102-9668-4f5b7e3f98a4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/restorePointCollection2", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + ] + } + } + }, + "operationId": "RestorePointCollections_List", + "title": "Gets the list of restore point collections in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json new file mode 100644 index 0000000000..8a0c34d6f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_ListAll.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "restorePointCollection1", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/resourceGroup1/providers/Microsoft.Compute/restorePointCollections/restorePointCollection1", + "location": "westus", + "properties": { + "provisioningState": "Succeeded", + "restorePointCollectionId": "59f04a5d-f783-4200-a1bd-d3f464e8c4b4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/VM_Test", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + }, + { + "name": "restorePointCollection2", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/resourceGroup2/providers/Microsoft.Compute/restorePointCollections/restorePointCollection2", + "location": "westus", + "properties": { + "provisioningState": "Deleting", + "restorePointCollectionId": "2875c590-e337-4102-9668-4f5b7e3f98a4", + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/VM_Prod", + "location": "westus" + } + }, + "tags": { + "myTag1": "tagValue1" + } + } + ] + } + } + }, + "operationId": "RestorePointCollections_ListAll", + "title": "Gets the list of restore point collections in a subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json new file mode 100644 index 0000000000..58c36e2ef9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMaximumSetGen.json @@ -0,0 +1,195 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM" + } + }, + "tags": { + "key8536": "aaaaaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myRpc", + "type": "Microsoft.Compute/restorePointCollections", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/myRpc", + "location": "norwayeast", + "properties": { + "provisioningState": "Successful", + "restorePointCollectionId": "638f052b-a7c2-450c-89e7-6a3b8f1d6a7c", + "restorePoints": [ + { + "name": "aaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaa", + "properties": { + "consistencyMode": "CrashConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + } + ], + "provisioningState": "aaaaaaaaaaaaaaaaa", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "licenseType": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "diskSizeGB": 24, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "diskSizeGB": 3, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-11-30T12:58:26.593Z" + } + } + ], + "source": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "eastus" + } + }, + "tags": {} + } + } + }, + "operationId": "RestorePointCollections_Update", + "title": "RestorePointCollection_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json new file mode 100644 index 0000000000..7fdd4094a2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePointCollections_Update_RestorePointCollectionUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "norwayeast" + } + } + }, + "operationId": "RestorePointCollections_Update", + "title": "RestorePointCollection_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json new file mode 100644 index 0000000000..cfd762e17f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CopyARestorePointToADifferentRegion.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "sourceRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName" + } + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "201": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "provisioningState": "Creating", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk123", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/dataDisk123_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/dataDisk123", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "osDisk123", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/osDisk123_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk123", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "c2FtcGxlIHVzZXJEYXRh", + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "sourceRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/sourceRpcName/restorePoints/sourceRpName" + }, + "timeCreated": "2021-10-25T23:54:29.2796325+00:00" + } + } + } + }, + "operationId": "RestorePoints_Create", + "title": "Copy a restore point to a different region" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json new file mode 100644 index 0000000000..0113a290b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Create_CreateARestorePoint.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + ] + } + }, + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "201": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + ], + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk123", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/dataDisk123_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/dataDisk123", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "osDisk123", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/osDisk123_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/osDisk123", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "c2FtcGxlIHVzZXJEYXRh", + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + } + }, + "operationId": "RestorePoints_Create", + "title": "Create a restore point" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json new file mode 100644 index 0000000000..8826f6d36e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaaaaaaa", + "restorePointName": "a", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePoints_Delete", + "title": "RestorePoint_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json new file mode 100644 index 0000000000..0de58ccd53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Delete_RestorePointDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "restorePointCollectionName": "aaaaaaaaaaaaaaaaa", + "restorePointName": "aaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "RestorePoints_Delete", + "title": "RestorePoint_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json new file mode 100644 index 0000000000..fdd3363889 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetARestorePoint.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f" + } + ], + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + } + }, + "operationId": "RestorePoints_Get", + "title": "Get a restore point" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json new file mode 100644 index 0000000000..d59ce7b188 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/RestorePoints_Get_GetRestorePointWithInstanceView.json @@ -0,0 +1,114 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "instanceView", + "resourceGroupName": "myResourceGroup", + "restorePointCollectionName": "rpcName", + "restorePointName": "rpName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "rpName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName", + "properties": { + "consistencyMode": "ApplicationConsistent", + "excludeDisks": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vm8768_disk2_fe6ffde4f69b491ca33fb984d5bcd89f" + } + ], + "instanceView": { + "diskRestorePoints": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57", + "replicationStatus": { + "completionPercent": 100, + "status": { + "code": "ReplicationState/succeeded", + "displayStatus": "Succeeded", + "level": "Info" + } + } + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5", + "replicationStatus": { + "completionPercent": 100, + "status": { + "code": "ReplicationState/succeeded", + "displayStatus": "Succeeded", + "level": "Info" + } + } + } + ], + "statuses": [ + { + "code": "ReplicationState/succeeded", + "displayStatus": "Succeeded", + "level": "Info" + } + ] + }, + "provisioningState": "Succeeded", + "sourceMetadata": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_B1s" + }, + "location": "westus", + "osProfile": { + "adminUsername": "admin", + "allowExtensionOperations": true, + "computerName": "computerName", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "testingexcludedisk_DataDisk_1", + "caching": "None", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/restorePointCollections/mynewrpc/restorePoints/restorepointtwo/diskRestorePoints/testingexcludedisk_DataDisk_1_68785190-1acb-4d5e-a8ae-705b45f3dca5" + }, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/userdata/providers/Microsoft.Compute/disks/testingexcludedisk_DataDisk_1", + "storageAccountType": "Standard_LRS" + } + } + ], + "osDisk": { + "name": "testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "caching": "ReadWrite", + "diskRestorePoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/rpName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "76d6541e-80bd-4dc1-932b-3cae4cfb80e7" + }, + "timeCreated": "2021-01-27T20:35:05.8401519+00:00" + } + } + } + }, + "operationId": "RestorePoints_Get", + "title": "Get restore point with instance view" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json new file mode 100644 index 0000000000..c47cfbb40e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_Get.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName" + }, + "location": "myLocation" + } + } + }, + "operationId": "SharedGalleries_Get", + "title": "Get a shared gallery." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json new file mode 100644 index 0000000000..5f4d208f5d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleries_List.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscriptionId}/providers/Microsoft.Compute/sharedGalleries?$skiptoken={token}/Subscriptions/{subscriptionId}/galleries/galleryUniqueName", + "value": [ + { + "name": "galleryUniqueName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName" + }, + "location": "myLocation" + } + ] + } + } + }, + "operationId": "SharedGalleries_List", + "title": "List shared galleries." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json new file mode 100644 index 0000000000..4f6f72dcf4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryImageVersionName": "myGalleryImageVersionName", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageVersionName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + } + }, + "operationId": "SharedGalleryImageVersions_Get", + "title": "Get a shared gallery image version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json new file mode 100644 index 0000000000..aaed0c1156 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImageVersions_List.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/sharedGalleries/galleryUniqueName/images/myGalleryImageName/versions?$skiptoken={token}/Subscriptions/{subscription-Id}/galleries/galleryUniqueName/images/myGalleryImageName/versions/myGalleryImageVersionName", + "value": [ + { + "name": "myGalleryImageVersionName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName/Versions/myGalleryImageVersionName" + }, + "location": "myLocation", + "properties": { + "endOfLifeDate": "2022-03-20T09:12:28Z", + "excludeFromLatest": false, + "publishedDate": "2018-03-20T09:12:28Z", + "storageProfile": { + "osDiskImage": { + "diskSizeGB": 29, + "hostCaching": "None" + } + } + } + } + ] + } + } + }, + "operationId": "SharedGalleryImageVersions_List", + "title": "List shared gallery image versions." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json new file mode 100644 index 0000000000..ae8c22b378 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryImageName": "myGalleryImageName", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myGalleryImageName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "eula": "https://www.microsoft.com/en-us/", + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows", + "privacyStatementUri": "https://www.microsoft.com/en-us/" + } + } + } + }, + "operationId": "SharedGalleryImages_Get", + "title": "Get a shared gallery image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json new file mode 100644 index 0000000000..f60b386631 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SharedGalleryImages_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2022-03-03", + "galleryUniqueName": "galleryUniqueName", + "location": "myLocation", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "http://svchost:99/subscriptions/{subscription-Id}/providers/Microsoft.Compute/sharedGalleries/galleryUniqueName/images?$skiptoken={token}/Subscriptions/{subscription-Id}/galleries/galleryUniqueName/images/myGalleryImageName", + "value": [ + { + "name": "myGalleryImageName", + "identifier": { + "uniqueId": "/SharedGalleries/galleryUniqueName/Images/myGalleryImageName" + }, + "location": "myLocation", + "properties": { + "hyperVGeneration": "V1", + "identifier": { + "offer": "myOfferName", + "publisher": "myPublisherName", + "sku": "mySkuName" + }, + "osState": "Generalized", + "osType": "Windows" + } + } + ] + } + } + }, + "operationId": "SharedGalleryImages_List", + "title": "List shared gallery images." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json new file mode 100644 index 0000000000..831b584947 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromADifferentSubscription.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + } + } + }, + "snapshotName": "mySnapshot1", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot by importing an unmanaged blob from a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json new file mode 100644 index 0000000000..971214ab6b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotByImportingAnUnmanagedBlobFromTheSameSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + } + } + }, + "snapshotName": "mySnapshot1", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot1", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot by importing an unmanaged blob from the same subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json new file mode 100644 index 0000000000..ea38f80700 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnElasticSanVolumeSnapshot.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + } + } + }, + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyFromSanSnapshot", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.ElasticSan/elasticSans/myElasticSan/volumegroups/myElasticSanVolumeGroup/snapshots/myElasticSanVolumeSnapshot" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot from an elastic san volume snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json new file mode 100644 index 0000000000..e0a453f068 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscription.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + } + } + }, + "snapshotName": "mySnapshot2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot from an existing snapshot in the same or a different subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json new file mode 100644 index 0000000000..41ddab55a0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_CreateOrUpdate_CreateASnapshotFromAnExistingSnapshotInTheSameOrADifferentSubscriptionInADifferentRegion.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyStart", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + } + } + }, + "snapshotName": "mySnapshot2", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyStart", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + }, + "202": { + "body": { + "name": "mySnapshot2", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "West US", + "properties": { + "creationData": { + "createOption": "CopyStart", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "provisioningState": "Updating" + } + } + } + }, + "operationId": "Snapshots_CreateOrUpdate", + "title": "Create a snapshot from an existing snapshot in the same or a different subscription in a different region." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json new file mode 100644 index 0000000000..0dc103b0e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + }, + "204": {} + }, + "operationId": "Snapshots_Delete", + "title": "Delete a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json new file mode 100644 index 0000000000..4ae70c97d6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutASnapshot.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "sourceUniqueId": "d633885d-d102-4481-901e-5b2413d1a7be" + }, + "diskSizeGB": 100, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "hyperVGeneration": "V1", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "test_sku", + "product": "marketplace_vm_test", + "publisher": "test_test_pmc2pc1" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "supportsHibernation": true, + "timeCreated": "2016-12-28T04:41:35.079872+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + } + }, + "operationId": "Snapshots_Get", + "title": "Get information about a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json new file mode 100644 index 0000000000..7902492bb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Get_GetInformationAboutAnIncrementalSnapshot.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "myIncrementalSnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "myIncrementalSnapshot", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/myIncrementalSnapshot", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDisk", + "sourceUniqueId": "d633885d-d102-4481-901e-5b2413d1a7be" + }, + "diskSizeBytes": 10737418240, + "diskSizeGB": 100, + "diskState": "0", + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "hyperVGeneration": "V1", + "incremental": true, + "incrementalSnapshotFamilyId": "d1a341d5-1ea7-4a85-b304-944ad8021639", + "networkAccessPolicy": "0", + "osType": "Windows", + "provisioningState": "Succeeded", + "purchasePlan": { + "name": "test_sku", + "product": "marketplace_vm_test", + "publisher": "test_test_pmc2pc1" + }, + "supportedCapabilities": { + "acceleratedNetwork": true + }, + "supportsHibernation": true, + "timeCreated": "2016-12-28T04:41:35.079872+00:00", + "uniqueId": "a395e9c1-fb9e-446e-a9ba-7b2fa0bcd305" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + } + }, + "operationId": "Snapshots_Get", + "title": "Get information about an incremental snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json new file mode 100644 index 0000000000..db7f54a1eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_GrantAccess.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "grantAccessData": { + "access": "Read", + "durationInSeconds": 300, + "fileFormat": "VHDX" + }, + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accessSAS": "https://md-gpvmcxzlzxgd.partition.blob.storage.azure.net/xx3cqcx53f0v/abcd?sv=2014-02-14&sr=b&sk=key1&sig=XXX&st=2021-05-24T18:02:34Z&se=2021-05-24T18:19:14Z&sp=r" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Snapshots_GrantAccess", + "title": "Get a sas on a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json new file mode 100644 index 0000000000..6ce58129c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_List.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mySnapshot1", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:47:30.6630569+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + }, + { + "name": "mySnapshot2", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot2", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Import", + "sourceUri": "https://mystorageaccount.blob.core.windows.net/osimages/osimage.vhd", + "storageAccountId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Storage/storageAccounts/myStorageAccount" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:47:30.3247198+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + ] + } + } + }, + "operationId": "Snapshots_List", + "title": "List all snapshots in a subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json new file mode 100644 index 0000000000..e2a832bb9f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_ListByResourceGroup.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "mySnapshot", + "type": "Microsoft.Compute/snapshots", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot", + "location": "westus", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "diskSizeGB": 200, + "encryption": { + "type": "EncryptionAtRestWithPlatformKey" + }, + "encryptionSettingsCollection": { + "enabled": true, + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "https://myvmvault.vault-int.azure-int.net/secrets/{secret}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + }, + "keyEncryptionKey": { + "keyUrl": "https://myvmvault.vault-int.azure-int.net/keys/{key}", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/myVMVault" + } + } + } + ] + }, + "osType": "Windows", + "provisioningState": "Succeeded", + "timeCreated": "2016-12-28T04:41:35.9278721+00:00" + }, + "tags": { + "department": "Development", + "project": "Snapshots" + } + } + ] + } + } + }, + "operationId": "Snapshots_ListByResourceGroup", + "title": "List all snapshots in a resource group." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json new file mode 100644 index 0000000000..984c116e1f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_RevokeAccess.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/operations/{operationId}&monitor=true&api-version=2023-04-02" + } + } + }, + "operationId": "Snapshots_RevokeAccess", + "title": "Revoke access to a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json new file mode 100644 index 0000000000..688004c198 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshot.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "properties": { + "diskSizeGB": 20 + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Succeeded" + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + } + }, + "202": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Updating" + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot?api-version=2021-04-01" + } + } + }, + "operationId": "Snapshots_Update", + "title": "Update a snapshot." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json new file mode 100644 index 0000000000..fc443b9094 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/Snapshots_Update_UpdateASnapshotWithAcceleratedNetworking.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-04-02", + "resourceGroupName": "myResourceGroup", + "snapshot": { + "properties": { + "diskSizeGB": 20, + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "snapshotName": "mySnapshot", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Succeeded", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + } + }, + "202": { + "body": { + "name": "mySnapshot", + "location": "West US", + "properties": { + "creationData": { + "createOption": "Copy", + "sourceResourceId": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot1" + }, + "diskSizeGB": 20, + "provisioningState": "Updating", + "supportedCapabilities": { + "acceleratedNetwork": false + } + }, + "tags": { + "department": "Development", + "project": "UpdateSnapshots" + } + }, + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot?api-version=2021-04-01" + } + } + }, + "operationId": "Snapshots_Update", + "title": "Update a snapshot with accelerated networking." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json new file mode 100644 index 0000000000..fa24a20234 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Create.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + } + }, + "resourceGroupName": "myResourceGroup", + "sshPublicKeyName": "mySshPublicKeyName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySshPublicKeyName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + } + } + }, + "201": { + "body": { + "name": "mySshPublicKeyName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + } + } + } + }, + "operationId": "SshPublicKeys_Create", + "title": "Create a new SSH public key resource." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json new file mode 100644 index 0000000000..4e8ee192a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMaximumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "SshPublicKeys_Delete", + "title": "SshPublicKey_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json new file mode 100644 index 0000000000..e96813875f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Delete_SshPublicKeyDeleteMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "SshPublicKeys_Delete", + "title": "SshPublicKey_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json new file mode 100644 index 0000000000..e63da376f8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_GenerateKeyPair.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "sshPublicKeyName": "mySshPublicKeyName", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/SshPublicKeys/mySshPublicKeyName", + "privateKey": "{ssh private key}", + "publicKey": "{ssh-rsa public key}" + } + } + }, + "operationId": "SshPublicKeys_GenerateKeyPair", + "title": "Generate an SSH key pair." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json new file mode 100644 index 0000000000..3a8c8ec9fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Get.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "sshPublicKeyName": "mySshPublicKeyName", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "name": "mySshPublicKeyName", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/SshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "{tagName}": "{tagValue}" + } + } + } + }, + "operationId": "SshPublicKeys_Get", + "title": "Get an ssh public key." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..733a8fd7a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMaximumSetGen.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaa", + "value": [ + { + "name": "mySshPublicKeyName", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key6396": "aaaaaaaaaaaaa", + "key8839": "aaa" + } + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListByResourceGroup", + "title": "SshPublicKey_ListByResourceGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json new file mode 100644 index 0000000000..6d7010bece --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListByResourceGroup_SshPublicKeyListByResourceGroupMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus" + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListByResourceGroup", + "title": "SshPublicKey_ListByResourceGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..5ffabad8f3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMaximumSetGen.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaa", + "value": [ + { + "name": "mySshPublicKeyName", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key6396": "aaaaaaaaaaaaa", + "key8839": "aaa" + } + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListBySubscription", + "title": "SshPublicKey_ListBySubscription_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json new file mode 100644 index 0000000000..e18fda32b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_ListBySubscription_SshPublicKeyListBySubscriptionMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus" + } + ] + } + } + }, + "operationId": "SshPublicKeys_ListBySubscription", + "title": "SshPublicKey_ListBySubscription_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json new file mode 100644 index 0000000000..dedd50aa06 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMaximumSetGen.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key2854": "a" + } + }, + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "mySshPublicKeyName", + "type": "aaaa", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/sshPublicKeys/mySshPublicKeyName", + "location": "westus", + "properties": { + "publicKey": "{ssh-rsa public key}" + }, + "tags": { + "key6396": "aaaaaaaaaaaaa", + "key8839": "aaa" + } + } + } + }, + "operationId": "SshPublicKeys_Update", + "title": "SshPublicKey_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json new file mode 100644 index 0000000000..0ecbb95831 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/SshPublicKeys_Update_SshPublicKeyUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "sshPublicKeyName": "aaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "SshPublicKeys_Update", + "title": "SshPublicKey_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json new file mode 100644 index 0000000000..f5ddc129c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMaximumSetGen.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "type": "aaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "location": "aaaaaaaaaaaaa", + "publisherName": "aaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}", + "version": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "aaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa", + "properties": { + "computeRole": "aaaaaaaaaaaaaaaaa", + "handlerSchema": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "operatingSystem": "aaaaaaaaaaaaaaaaaa", + "supportsMultipleExtensions": true, + "vmScaleSetEnabled": true + }, + "tags": { + "key9885": "aaaaaaaaa" + } + } + } + }, + "operationId": "VirtualMachineExtensionImages_Get", + "title": "VirtualMachineExtensionImage_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json new file mode 100644 index 0000000000..32f556b793 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_Get_VirtualMachineExtensionImageGetMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "type": "aa", + "api-version": "2023-07-01", + "location": "aaaaaaaaaaaaaa", + "publisherName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}", + "version": "aaa" + }, + "responses": { + "200": { + "body": { + "name": "aaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa" + } + } + }, + "operationId": "VirtualMachineExtensionImages_Get", + "title": "VirtualMachineExtensionImage_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json new file mode 100644 index 0000000000..072cb56aa0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMaximumSetGen.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "publisherName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": [ + { + "name": "aaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa", + "properties": { + "computeRole": "aaaaaaaaaaaaaaaaa", + "handlerSchema": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "operatingSystem": "aaaaaaaaaaaaaaaaaa", + "supportsMultipleExtensions": true, + "vmScaleSetEnabled": true + }, + "tags": { + "key9885": "aaaaaaaaa" + } + } + ] + } + }, + "operationId": "VirtualMachineExtensionImages_ListTypes", + "title": "VirtualMachineExtensionImage_ListTypes_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json new file mode 100644 index 0000000000..b68e29e0ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensionImages_ListTypes_VirtualMachineExtensionImageListTypesMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "aaaa", + "publisherName": "aa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": [ + { + "name": "aaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa" + } + ] + } + }, + "operationId": "VirtualMachineExtensionImages_ListTypes", + "title": "VirtualMachineExtensionImage_ListTypes_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json new file mode 100644 index 0000000000..98121c98c7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMaximumSetGen.json @@ -0,0 +1,148 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aaaaaaaaaaaaa", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + } + }, + "201": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineExtensions_CreateOrUpdate", + "title": "VirtualMachineExtension_CreateOrUpdate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json new file mode 100644 index 0000000000..edcf0e2574 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_CreateOrUpdate_VirtualMachineExtensionCreateOrUpdateMinimumSetGen.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "location": "westus" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus" + } + }, + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus" + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineExtensions_CreateOrUpdate", + "title": "VirtualMachineExtension_CreateOrUpdate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json new file mode 100644 index 0000000000..0a468b42e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineExtensions_Delete", + "title": "VirtualMachineExtension_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json new file mode 100644 index 0000000000..ca9870b410 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Delete_VirtualMachineExtensionDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aa", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineExtensions_Delete", + "title": "VirtualMachineExtension_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json new file mode 100644 index 0000000000..3862aafc00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMaximumSetGen.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "$expand": "aaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "aaaaaaa", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + } + } + }, + "operationId": "VirtualMachineExtensions_Get", + "title": "VirtualMachineExtension_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json new file mode 100644 index 0000000000..9ac16118a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Get_VirtualMachineExtensionGetMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus" + } + } + }, + "operationId": "VirtualMachineExtensions_Get", + "title": "VirtualMachineExtension_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json new file mode 100644 index 0000000000..acef71393a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMaximumSetGen.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "$expand": "aaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "a", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + }, + "tags": { + "key9183": "aa" + } + } + ] + } + } + }, + "operationId": "VirtualMachineExtensions_List", + "title": "VirtualMachineExtension_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json new file mode 100644 index 0000000000..69864d9c70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_List_VirtualMachineExtensionListMinimumSetGen.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineExtensions_List", + "title": "VirtualMachineExtension_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json new file mode 100644 index 0000000000..41cf1094fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineExtensions_Update.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/myVMExtension", + "location": "westus", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "suppressFailures": true, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineExtensions_Update", + "title": "Update VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json new file mode 100644 index 0000000000..419b9b2c68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_CreateOrUpdate.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommand": { + "location": "West US", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/scriptURI", + "outputBlobManagedIdentity": { + "clientId": "22d35efb-0c99-4041-8c5b-6d24db33a69a" + }, + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "runAsPassword": "", + "runAsUser": "user1", + "source": { + "scriptUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/scriptURI" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + } + }, + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Succeeded", + "runAsUser": "user1", + "source": { + "scriptUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "201": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Creating", + "runAsUser": "user1", + "source": { + "scriptUri": "https://mystorageaccount.blob.core.windows.net/scriptcontainer/MyScript.ps1" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "operationId": "VirtualMachineRunCommands_CreateOrUpdate", + "title": "Create or update a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json new file mode 100644 index 0000000000..d04613e1f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineRunCommands_Delete", + "title": "Delete a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json new file mode 100644 index 0000000000..4240d40bf0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_GetByVirtualMachine.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Succeeded", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World! ; Remove-Item C:\test\testFile.txt" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "operationId": "VirtualMachineRunCommands_GetByVirtualMachine", + "title": "Get a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json new file mode 100644 index 0000000000..cf7ad918a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "SoutheastAsia", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "description": "Configure the machine to enable remote PowerShell.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "EnableRemotePS", + "label": "Enable remote PowerShell", + "osType": "Windows" + }, + { + "description": "Shows detailed information for the IP address, subnet mask and default gateway for each adapter bound to TCP/IP.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "IPConfig", + "label": "List IP configuration", + "osType": "Windows" + }, + { + "description": "Custom multiline PowerShell script should be defined in script property. Optional parameters can be set in parameters property.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "RunPowerShellScript", + "label": "Executes a PowerShell script", + "osType": "Windows" + }, + { + "description": "Custom multiline shell script should be defined in script property. Optional parameters can be set in parameters property.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "RunShellScript", + "label": "Executes a Linux shell script", + "osType": "Linux" + }, + { + "description": "Get the configuration of all network interfaces.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "ifconfig", + "label": "List network configuration", + "osType": "Linux" + }, + { + "description": "Checks if the local Administrator account is disabled, and if so enables it.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "EnableAdminAccount", + "label": "Enable administrator account", + "osType": "Windows" + }, + { + "description": "Reset built-in Administrator account password.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "ResetAccountPassword", + "label": "Reset built-in Administrator account password", + "osType": "Windows" + }, + { + "description": "Checks registry settings and domain policy settings. Suggests policy actions if machine is part of a domain or modifies the settings to default values.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "RDPSettings", + "label": "Verify RDP Listener Settings", + "osType": "Windows" + }, + { + "description": "Sets the default or user specified port number for Remote Desktop connections. Enables firewall rule for inbound access to the port.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "SetRDPPort", + "label": "Set Remote Desktop port", + "osType": "Windows" + }, + { + "description": "Removes the SSL certificate tied to the RDP listener and restores the RDP listerner security to default. Use this script if you see any issues with the certificate.", + "$schema": "http://schema.management.azure.com/schemas/2016-11-17/runcommands.json", + "id": "ResetRDPCert", + "label": "Restore RDP Authentication mode to defaults", + "osType": "Windows" + } + ] + } + } + }, + "operationId": "VirtualMachineRunCommands_List", + "title": "VirtualMachineRunCommandList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json new file mode 100644 index 0000000000..9cfd9c236f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_ListByVirtualMachine.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Succeeded", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World!" + }, + "timeoutInSeconds": 0, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + ] + } + } + }, + "operationId": "VirtualMachineRunCommands_ListByVirtualMachine", + "title": "List run commands in a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json new file mode 100644 index 0000000000..091a4a039f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineRunCommands_Update.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "runCommand": { + "properties": { + "asyncExecution": false, + "errorBlobManagedIdentity": { + "objectId": "4231e4d2-33e4-4e23-96b2-17888afa6072" + }, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/outputUri", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "runAsPassword": "", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World! ; Remove-Item C:\test\testFile.txt" + }, + "timeoutInSeconds": 3600 + } + }, + "runCommandName": "myRunCommand", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myRunCommand", + "type": "Microsoft.Compute/virtualMachines/runCommands", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/runCommands/myRunCommand", + "location": "westus", + "properties": { + "asyncExecution": false, + "errorBlobUri": "https://mystorageaccount.blob.core.windows.net/mycontainer/MyScriptError.txt", + "outputBlobUri": "https://mystorageaccount.blob.core.windows.net/myscriptoutputcontainer/MyScriptoutput.txt", + "parameters": [ + { + "name": "param1", + "value": "value1" + }, + { + "name": "param2", + "value": "value2" + } + ], + "provisioningState": "Updating", + "runAsUser": "user1", + "source": { + "script": "Write-Host Hello World! ; Remove-Item C:\test\testFile.txt" + }, + "timeoutInSeconds": 3600, + "treatFailureAsDeploymentFailure": false + }, + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + } + }, + "operationId": "VirtualMachineRunCommands_Update", + "title": "Update a run command." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json new file mode 100644 index 0000000000..8c8bcfb0e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMaximumSetGen.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + }, + "201": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_CreateOrUpdate", + "title": "VirtualMachineScaleSetExtension_CreateOrUpdate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json new file mode 100644 index 0000000000..b081fdc5aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_CreateOrUpdate_VirtualMachineScaleSetExtensionCreateOrUpdateMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaa", + "vmssExtensionName": "aaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_CreateOrUpdate", + "title": "VirtualMachineScaleSetExtension_CreateOrUpdate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json new file mode 100644 index 0000000000..5caa1a734d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetExtensions_Delete", + "title": "VirtualMachineScaleSetExtension_Delete_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json new file mode 100644 index 0000000000..a377945d74 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Delete_VirtualMachineScaleSetExtensionDeleteMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetExtensions_Delete", + "title": "VirtualMachineScaleSetExtension_Delete_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json new file mode 100644 index 0000000000..b16693ac77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMaximumSetGen.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "$expand": "aaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Get", + "title": "VirtualMachineScaleSetExtension_Get_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json new file mode 100644 index 0000000000..68dd6b583d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Get_VirtualMachineScaleSetExtensionGetMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "a", + "vmssExtensionName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Get", + "title": "VirtualMachineScaleSetExtension_Get_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json new file mode 100644 index 0000000000..98bd33075a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMaximumSetGen.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aa", + "value": [ + { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_List", + "title": "VirtualMachineScaleSetExtension_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json new file mode 100644 index 0000000000..59ffca6e76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_List_VirtualMachineScaleSetExtensionListMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + {} + ] + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_List", + "title": "VirtualMachineScaleSetExtension_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json new file mode 100644 index 0000000000..0848c0697a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMaximumSetGen.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aaaa" + }, + "responses": { + "200": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + }, + "201": { + "body": { + "name": "{extension-name}", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Update", + "title": "VirtualMachineScaleSetExtension_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json new file mode 100644 index 0000000000..d590e325db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetExtensions_Update_VirtualMachineScaleSetExtensionUpdateMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmssExtensionName": "aa" + }, + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetExtensions_Update", + "title": "VirtualMachineScaleSetExtension_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json new file mode 100644 index 0000000000..8cc0f8b000 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_Cancel", + "title": "VirtualMachineScaleSetRollingUpgrade_Cancel_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json new file mode 100644 index 0000000000..e3b188b6e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_Cancel_VirtualMachineScaleSetRollingUpgradeCancelMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_Cancel", + "title": "VirtualMachineScaleSetRollingUpgrade_Cancel_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json new file mode 100644 index 0000000000..6b19edc110 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMaximumSetGen.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "aaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaa", + "location": "aaaaaa", + "properties": { + "error": { + "code": "aaaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaaaaaaaa", + "target": "aaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaaa", + "message": "aa", + "target": "aaaa" + } + ] + }, + "policy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + }, + "progress": { + "failedInstanceCount": 25, + "inProgressInstanceCount": 20, + "pendingInstanceCount": 27, + "successfulInstanceCount": 6 + }, + "runningStatus": { + "code": "RollingForward", + "lastAction": "Start", + "lastActionTime": "2021-11-30T13:06:23.362Z", + "startTime": "2021-11-30T13:06:23.362Z" + } + }, + "tags": { + "key8533": "aaaaaaaaaaaaaaaaaaaaaaaa" + } + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_GetLatest", + "title": "VirtualMachineScaleSetRollingUpgrade_GetLatest_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json new file mode 100644 index 0000000000..2af4ebb80d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_GetLatest_VirtualMachineScaleSetRollingUpgradeGetLatestMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "id": "aaaaaaaaaa", + "location": "aaaaaa" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_GetLatest", + "title": "VirtualMachineScaleSetRollingUpgrade_GetLatest_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json new file mode 100644 index 0000000000..c847cef6a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_StartExtensionUpgrade", + "title": "Start an extension rolling upgrade." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json new file mode 100644 index 0000000000..6910a88ab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade", + "title": "VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json new file mode 100644 index 0000000000..c68c409441 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade_VirtualMachineScaleSetRollingUpgradeStartOsUpgradeMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetRollingUpgrades_StartOSUpgrade", + "title": "VirtualMachineScaleSetRollingUpgrade_StartOSUpgrade_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json new file mode 100644 index 0000000000..87d7c9f562 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_CreateOrUpdate.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + }, + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + }, + "201": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_CreateOrUpdate", + "title": "Create VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json new file mode 100644 index 0000000000..078be51f4d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetVMExtensions_Delete", + "title": "Delete VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json new file mode 100644 index 0000000000..4b96d22c1c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Get.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_Get", + "title": "Get VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json new file mode 100644 index 0000000000..5676ff0ea8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_List.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + }, + { + "name": "myVMExtension1", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension1", + "properties": { + "type": "extType1", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "extPublisher1", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.0" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_List", + "title": "List extensions in Vmss instance." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json new file mode 100644 index 0000000000..0fafa60a43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMExtensions_Update.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "extensionParameters": { + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + }, + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmExtensionName": "myVMExtension", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVMExtension", + "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines/extensions", + "id": "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myvmScaleSet/virtualMachines/0/extensions/myVMExtension", + "properties": { + "type": "extType", + "autoUpgradeMinorVersion": true, + "provisioningState": "Creating", + "publisher": "extPublisher", + "settings": { + "UserName": "xyz@microsoft.com" + }, + "typeHandlerVersion": "1.2" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMExtensions_Update", + "title": "Update VirtualMachineScaleSet VM extension." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json new file mode 100644 index 0000000000..2acf5a3899 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Deallocate", + "title": "VirtualMachineScaleSetVM_Deallocate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json new file mode 100644 index 0000000000..15fd7aa4aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Deallocate_VirtualMachineScaleSetVmDeallocateMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Deallocate", + "title": "VirtualMachineScaleSetVM_Deallocate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json new file mode 100644 index 0000000000..992a611f79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": "true", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSetVMs_Delete", + "title": "Force Delete a virtual machine from a VM scale set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json new file mode 100644 index 0000000000..e37af7c6a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_GetInstanceView.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "assignedHost": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup/hosts/myHost", + "bootDiagnostics": null, + "disks": [ + { + "name": "myOSDisk", + "encryptionSettings": null, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": null, + "time": "2023-07-01T04:58:58.0882815+00:00" + } + ] + } + ], + "platformFaultDomain": 0, + "platformUpdateDomain": 0, + "rdpThumbPrint": null, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": null, + "time": "2020-06-05T04:59:58.1852966+00:00" + }, + { + "code": "PowerState/running", + "displayStatus": "VM running", + "level": "Info", + "message": null, + "time": null + } + ], + "vmAgent": { + "extensionHandlers": null, + "statuses": [ + { + "code": "ProvisioningState/Unavailable", + "displayStatus": "Not Ready", + "level": "Warning", + "message": "VM status blob is found but not yet populated.", + "time": "2023-07-01T05:00:32+00:00" + } + ], + "vmAgentVersion": "Unknown" + }, + "extensions": null + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_GetInstanceView", + "title": "Get instance view of a virtual machine from a VM scale set placed on a dedicated host group through automatic placement." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json new file mode 100644 index 0000000000..30d0fee4f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithUserData.json @@ -0,0 +1,135 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "UserData", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": {}, + "latestModelApplied": true, + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415" + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 128, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Get", + "title": "Get VM scale set VM with UserData" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json new file mode 100644 index 0000000000..16140d7f15 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Get_GetVmScaleSetVmWithVmSizeProperties.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "UserData", + "instanceId": "0", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "latestModelApplied": true, + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415" + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 128, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Get", + "title": "Get VM scale set VM with VMSizeProperties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json new file mode 100644 index 0000000000..83795449f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMaximumSetGen.json @@ -0,0 +1,548 @@ +{ + "parameters": { + "$expand": "aaaaaaaaaaaaa", + "$filter": "aaaaaaaaaaaaaa", + "$select": "aaaaaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "virtualMachineScaleSetName": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaa", + "value": [ + { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "instanceId": "aaaaaaaaaaaa", + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "assignedHost": "aaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "latestModelApplied": true, + "licenseType": "aaaaaaaaaa", + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "provisioningState": "Succeeded", + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskIOPSReadWrite": 18, + "diskMBpsReadWrite": 29, + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.9" + }, + "tags": {} + } + ], + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "a" + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_List", + "title": "VirtualMachineScaleSetVM_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json new file mode 100644 index 0000000000..419d0fbf7e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_List_VirtualMachineScaleSetVmListMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "virtualMachineScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus" + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_List", + "title": "VirtualMachineScaleSetVM_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json new file mode 100644 index 0000000000..374077cabc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", + "title": "VirtualMachineScaleSetVM_PerformMaintenance_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json new file mode 100644 index 0000000000..e517b4e158 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PerformMaintenance_VirtualMachineScaleSetVmPerformMaintenanceMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PerformMaintenance", + "title": "VirtualMachineScaleSetVM_PerformMaintenance_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json new file mode 100644 index 0000000000..b3d7bf5758 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaa", + "resourceGroupName": "rgcompute", + "skipShutdown": true, + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PowerOff", + "title": "VirtualMachineScaleSetVM_PowerOff_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json new file mode 100644 index 0000000000..77694617d6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_PowerOff_VirtualMachineScaleSetVmPowerOffMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_PowerOff", + "title": "VirtualMachineScaleSetVM_PowerOff_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json new file mode 100644 index 0000000000..da353c3373 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Redeploy", + "title": "VirtualMachineScaleSetVM_Redeploy_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json new file mode 100644 index 0000000000..7d4f8396c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Redeploy_VirtualMachineScaleSetVmRedeployMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Redeploy", + "title": "VirtualMachineScaleSetVM_Redeploy_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json new file mode 100644 index 0000000000..ddd9a5acf7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_ReimageAll", + "title": "VirtualMachineScaleSetVM_ReimageAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json new file mode 100644 index 0000000000..ff7acca2eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_ReimageAll_VirtualMachineScaleSetVmReimageAllMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_ReimageAll", + "title": "VirtualMachineScaleSetVM_ReimageAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json new file mode 100644 index 0000000000..35135b0771 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMaximumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa", + "vmScaleSetVMReimageInput": { + "tempDisk": true + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Reimage", + "title": "VirtualMachineScaleSetVM_Reimage_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json new file mode 100644 index 0000000000..95a784e380 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Reimage_VirtualMachineScaleSetVmReimageMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Reimage", + "title": "VirtualMachineScaleSetVM_Reimage_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json new file mode 100644 index 0000000000..d051f42760 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Restart", + "title": "VirtualMachineScaleSetVM_Restart_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json new file mode 100644 index 0000000000..5debd00a34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Restart_VirtualMachineScaleSetVmRestartMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Restart", + "title": "VirtualMachineScaleSetVM_Restart_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json new file mode 100644 index 0000000000..63a7f27665 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "resourceGroupName": "ResourceGroup", + "sasUriExpirationTimeInMinutes": 60, + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": { + "body": { + "consoleScreenshotBlobUri": "https://storageuri/myvmScaleSetinstance.screenshot.bmp?{saskey}", + "serialConsoleLogBlobUri": "https://storageuri/myvmScaleSetinstance.serialconsole.log?{saskey}" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_RetrieveBootDiagnosticsData", + "title": "RetrieveBootDiagnosticsData of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json new file mode 100644 index 0000000000..eee25c4f9f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_RunCommand.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "0", + "parameters": { + "commandId": "RunPowerShellScript", + "script": [ + "Write-Host Hello World!" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "code": "ComponentStatus/StdOut/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "Hello World!" + }, + { + "code": "ComponentStatus/StdErr/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "" + } + ] + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_RunCommand", + "title": "VirtualMachineScaleSetVMs_RunCommand" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json new file mode 100644 index 0000000000..a2547f52e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_SimulateEviction.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "InstanceId", + "resourceGroupName": "ResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "VmScaleSetName" + }, + "responses": { + "204": {} + }, + "operationId": "VirtualMachineScaleSetVMs_SimulateEviction", + "title": "Simulate Eviction a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json new file mode 100644 index 0000000000..93d4524d58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Start", + "title": "VirtualMachineScaleSetVM_Start_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json new file mode 100644 index 0000000000..8c01e4ebfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Start_VirtualMachineScaleSetVmStartMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaa", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Start", + "title": "VirtualMachineScaleSetVM_Start_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json new file mode 100644 index 0000000000..e4ad3e3792 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMaximumSetGen.json @@ -0,0 +1,1535 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "parameters": { + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "bootDiagnostics": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "licenseType": "aaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "aaaaaaaaaaaaaaaa", + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + }, + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {} + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "instanceId": "aaaaaaaaaaaa", + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "assignedHost": "aaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "latestModelApplied": true, + "licenseType": "aaaaaaaaaa", + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "provisioningState": "Succeeded", + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskIOPSReadWrite": 18, + "diskMBpsReadWrite": 29, + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.9" + }, + "tags": {} + } + ], + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "a" + ] + } + }, + "202": { + "body": { + "name": "{vmss-vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "instanceId": "aaaaaaaaaaaa", + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaa" + } + }, + "hardwareProfile": { + "vmSize": "Basic_A0", + "vmSizeProperties": { + "vCPUsAvailable": 9, + "vCPUsPerCore": 12 + } + }, + "instanceView": { + "assignedHost": "aaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "disks": [ + { + "name": "aaaaaaaaaaa", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ] + } + ], + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aaaaaa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "maintenanceWindowStartTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowEndTime": "2021-11-30T12:58:26.531Z", + "preMaintenanceWindowStartTime": "2021-11-30T12:58:26.531Z" + }, + "placementGroupId": "aaa", + "platformFaultDomain": 14, + "platformUpdateDomain": 23, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaaaaaaaaaa", + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + }, + "typeHandlerVersion": "aaaaa" + } + ], + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ] + }, + "latestModelApplied": true, + "licenseType": "aaaaaaaaaa", + "modelDefinitionApplied": "VirtualMachineScaleSet", + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 2, + "ipTags": [ + { + "ipTagType": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0/networkInterfaces/vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "networkProfileConfiguration": { + "networkInterfaceConfigurations": [ + { + "name": "vmsstestnetconfig5415", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "vmsstestnetconfig9693", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vn4071/subnets/sn5503" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "test000000", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "protectionPolicy": { + "protectFromScaleIn": true, + "protectFromScaleSetActions": true + }, + "provisioningState": "Succeeded", + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "caching": "None", + "createOption": "Empty", + "deleteOption": "Delete", + "detachOption": "ForceDetach", + "diskIOPSReadWrite": 18, + "diskMBpsReadWrite": 29, + "diskSizeGB": 128, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_disk2_6c4f554bdafa49baa780eb2d128ff39d", + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true, + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "4.127.20180315", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20180315" + }, + "osDisk": { + "name": "vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/vmss3176_vmss3176_0_OsDisk_1_6d72b805e50e4de6830303c5055077fc", + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "42af9fdf-b906-4ad7-9905-8316209ff619" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "westus", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaa", + "statuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "substatuses": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaa", + "displayStatus": "aaaaaa", + "level": "Info", + "message": "a", + "time": "2021-11-30T12:58:26.522Z" + } + ], + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "protectedSettings": {}, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "1.9" + }, + "tags": {} + } + ], + "sku": { + "name": "Classic", + "capacity": 29, + "tier": "aaaaaaaaaaaaaa" + }, + "tags": {}, + "zones": [ + "a" + ] + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Update", + "title": "VirtualMachineScaleSetVM_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json new file mode 100644 index 0000000000..4a1229eb70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSetVMs_Update_VirtualMachineScaleSetVmUpdateMinimumSetGen.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "instanceId": "aaaaaaaaaaaaaaaaaaaa", + "parameters": { + "location": "westus" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus" + } + }, + "202": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}/virtualMachines/0", + "location": "westus" + }, + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSetVMs_Update", + "title": "VirtualMachineScaleSetVM_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json new file mode 100644 index 0000000000..62ddc36986 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMaximumSetGen.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "activePlacementGroupId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {} + }, + "operationId": "VirtualMachineScaleSets_ConvertToSinglePlacementGroup", + "title": "VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json new file mode 100644 index 0000000000..ca75f44be0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ConvertToSinglePlacementGroup_VirtualMachineScaleSetConvertToSinglePlacementGroupMinimumSetGen.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": {} + }, + "operationId": "VirtualMachineScaleSets_ConvertToSinglePlacementGroup", + "title": "VirtualMachineScaleSet_ConvertToSinglePlacementGroup_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json new file mode 100644 index 0000000000..b3bec13bf9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateACustomImageScaleSetFromAnUnmanagedGeneralizedOsImage.json @@ -0,0 +1,204 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d6e9ab29-f8c9-4792-978c-ae2c07b98f17", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows" + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d6e9ab29-f8c9-4792-978c-ae2c07b98f17", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows" + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a custom-image scale set from an unmanaged generalized os image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json new file mode 100644 index 0000000000..4974c566f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAPlatformImageScaleSetWithUnmanagedOsDisks.json @@ -0,0 +1,224 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhdContainers": [ + "http://{existing-storage-account-name-0}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-1}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-2}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-3}.blob.core.windows.net/vhdContainer", + "http://{existing-storage-account-name-4}.blob.core.windows.net/vhdContainer" + ] + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhdContainers": [ + "http://{existing-storage-account-name}.blob.core.windows.net/vhds" + ] + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhdContainers": [ + "http://{existing-storage-account-name}.blob.core.windows.net/vhds" + ] + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a platform-image scale set with unmanaged os disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json new file mode 100644 index 0000000000..e26b47bf92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromACustomImage.json @@ -0,0 +1,206 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set from a custom image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json new file mode 100644 index 0000000000..2578d3d37f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromAGeneralizedSharedImage.json @@ -0,0 +1,206 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set from a generalized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json new file mode 100644 index 0000000000..86965ede50 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetFromASpecializedSharedImage.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set from a specialized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json new file mode 100644 index 0000000000..4aacf2a731 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWhereNicConfigHasDisableTcpStateTrackingProperty.json @@ -0,0 +1,279 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "disableTcpStateTracking": true, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set where nic config has DisableTcpStateTracking property" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json new file mode 100644 index 0000000000..227e72da79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAMarketplaceImagePlan.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with a marketplace image plan." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json new file mode 100644 index 0000000000..19864fa73d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureApplicationGateway.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/{existing-application-gateway-name}/backendAddressPools/{existing-backend-address-pool-name}" + } + ], + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "a0134477-b9d9-484b-b0e3-205c1c089ffa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/nsgExistingAppGw/backendAddressPools/appGatewayBackendPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "a0134477-b9d9-484b-b0e3-205c1c089ffa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationGateways/nsgExistingAppGw/backendAddressPools/appGatewayBackendPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with an azure application gateway." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json new file mode 100644 index 0000000000..fd85af4bc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAnAzureLoadBalancer.json @@ -0,0 +1,253 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/backendAddressPools/{existing-backend-address-pool-name}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/{existing-load-balancer-name}/inboundNatPools/{existing-nat-pool-name}" + } + ], + "publicIPAddressConfiguration": { + "name": "{vmss-name}", + "properties": { + "publicIPAddressVersion": "IPv4" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ec0b21ca-51ec-414b-9323-f236ffc21479", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/backendAddressPools/lbBackendPool" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/inboundNatPools/lbNatPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ec0b21ca-51ec-414b-9323-f236ffc21479", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/backendAddressPools/lbBackendPool" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/loadBalancers/myLb/inboundNatPools/lbNatPool" + } + ], + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with an azure load balancer." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json new file mode 100644 index 0000000000..a5f562f0a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithApplicationProfile.json @@ -0,0 +1,258 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "enableAutomaticUpgrade": false, + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1", + "treatFailureAsDeploymentFailure": true + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Application Profile" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json new file mode 100644 index 0000000000..005e7d8cfe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithAutomaticRepairsEnabled.json @@ -0,0 +1,229 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT10M" + }, + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT10M" + }, + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT10M" + }, + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with automatic repairs enabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json new file mode 100644 index 0000000000..c16909efb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithBootDiagnostics.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json new file mode 100644 index 0000000000..3c83a7a00e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskControllerType.json @@ -0,0 +1,251 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "diskControllerType": "SCSI", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Disk Controller Type" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json new file mode 100644 index 0000000000..a83a187f87 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithDiskEncryptionSetResourceInOsDiskAndDataDisk.json @@ -0,0 +1,257 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with DiskEncryptionSet resource in os disk and data disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json new file mode 100644 index 0000000000..988e561f0b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEmptyDataDisksOnEachVm.json @@ -0,0 +1,272 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0 + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1 + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Succeeded", + "singlePlacementGroup": true, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with empty data disks on each vm." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json new file mode 100644 index 0000000000..19e0215244 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisks.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with ephemeral os disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json new file mode 100644 index 0000000000..ca752ecf61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithEphemeralOsDisksUsingPlacementProperty.json @@ -0,0 +1,244 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with ephemeral os disks using placement property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json new file mode 100644 index 0000000000..2f5f1d4555 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithExtensionTimeBudget.json @@ -0,0 +1,280 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with extension time budget." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json new file mode 100644 index 0000000000..cc2b66816e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithFpgaNetworkInterfaces.json @@ -0,0 +1,273 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + }, + { + "name": "{fpgaNic-Name}", + "properties": { + "enableAcceleratedNetworking": false, + "enableFpga": true, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "{fpgaNic-Name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{fpgaNic-Name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": true, + "ipConfigurations": [ + { + "name": "{fpgaNic-Name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{fpgaNic-Name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": true, + "ipConfigurations": [ + { + "name": "{fpgaNic-Name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Fpga Network Interfaces." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json new file mode 100644 index 0000000000..8ac7798fa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithHostEncryptionUsingEncryptionAtHostProperty.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Host Encryption using encryptionAtHost property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json new file mode 100644 index 0000000000..fa8c88ddb0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithManagedBootDiagnostics.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with managed boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json new file mode 100644 index 0000000000..cb3c9cfced --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithNetworkInterfacesWithPublicIpAddressDnsSettings.json @@ -0,0 +1,305 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "auxiliaryMode": "AcceleratedConnections", + "auxiliarySku": "A1", + "disableTcpStateTracking": true, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "enableAcceleratedNetworking": false, + "enableIPForwarding": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "publicip", + "properties": { + "dnsSettings": { + "domainNameLabel": "vmsstestlabel01", + "domainNameLabelScope": "NoReuse" + }, + "idleTimeoutInMinutes": 10 + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "auxiliaryMode": "AcceleratedConnections", + "auxiliarySku": "A1", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "publicip", + "properties": { + "dnsSettings": { + "domainNameLabel": "vmsstestlabel01", + "domainNameLabelScope": "TenantReuse" + }, + "idleTimeoutInMinutes": 10 + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "afa2afa8-9e49-48fb-9d18-c86323b5d064", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "auxiliaryMode": "AcceleratedConnections", + "auxiliarySku": "A1", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{nicConfig1-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + }, + { + "name": "{nicConfig2-name}", + "properties": { + "disableTcpStateTracking": false, + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableFpga": false, + "ipConfigurations": [ + { + "name": "{nicConfig2-name}", + "properties": { + "primary": true, + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-fpga-subnet-name2}" + } + } + } + ], + "primary": false + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Network Interfaces with public ip address dns settings." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json new file mode 100644 index 0000000000..15f3918c55 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithOsImageScheduledEventsEnabled.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with OS image scheduled events enabled." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json new file mode 100644 index 0000000000..ab8fdc3afd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPasswordAuthentication.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "ffb27c5c-39a5-4d4e-b307-b32598689813", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with password authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json new file mode 100644 index 0000000000..830ac88ad8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPremiumStorage.json @@ -0,0 +1,217 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "19fd38a2-f50a-42c6-9dc7-3f9cf3791225", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "19fd38a2-f50a-42c6-9dc7-3f9cf3791225", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with premium storage." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json new file mode 100644 index 0000000000..4c51b34baa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithPriorityMixPolicy.json @@ -0,0 +1,236 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "orchestrationMode": "Flexible", + "priorityMixPolicy": { + "baseRegularPriorityCount": 4, + "regularPriorityPercentageAboveBase": 50 + }, + "singlePlacementGroup": false, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 10, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "orchestrationMode": "Flexible", + "priorityMixPolicy": { + "baseRegularPriorityCount": 4, + "regularPriorityPercentageAboveBase": 50 + }, + "provisioningState": "Creating", + "singlePlacementGroup": false, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 10, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "orchestrationMode": "Flexible", + "priorityMixPolicy": { + "baseRegularPriorityCount": 4, + "regularPriorityPercentageAboveBase": 50 + }, + "provisioningState": "Creating", + "singlePlacementGroup": false, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 10, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with priority mix policy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json new file mode 100644 index 0000000000..0543568721 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithScaleInPolicy.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with scaleInPolicy." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json new file mode 100644 index 0000000000..022fac01f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityPostureReference.json @@ -0,0 +1,229 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "eastus2euap", + "properties": { + "overprovision": true, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityPostureReference": { + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d12ccb3d-ab15-4794-9836-c4196392e9f2", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityPostureReference": { + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d12ccb3d-ab15-4794-9836-c4196392e9f2", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityPostureReference": { + "id": "/CommunityGalleries/{communityGalleryName}/securityPostures/{securityPostureName}/versions/{major.minor.patch}|{major.*}|latest" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Security Posture Reference" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json new file mode 100644 index 0000000000..fa23501346 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSecurityTypeAsConfidentialVm.json @@ -0,0 +1,247 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DC2as_v5", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DC2as_v5", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DC2as_v5", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with SecurityType as ConfidentialVM" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json new file mode 100644 index 0000000000..fee9373033 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithServiceArtifactReference.json @@ -0,0 +1,229 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "eastus2euap", + "properties": { + "overprovision": true, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "eastus2euap", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "77b7df9a-32fe-45e3-8911-60ac9c9b9c64", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": true + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "serviceArtifactReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myGalleryName/serviceArtifacts/serviceArtifactName/vmArtifactsProfiles/vmArtifactsProfilesName" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2022-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "osDisk", + "caching": "ReadWrite", + "createOption": "FromImage" + } + } + } + }, + "sku": { + "name": "Standard_A1", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Service Artifact Reference" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json new file mode 100644 index 0000000000..133fbacf89 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSpotRestorePolicy.json @@ -0,0 +1,244 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "PT1H" + }, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 2, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "PT1H" + }, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 2, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "PT1H" + }, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "evictionPolicy": "Deallocate", + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "priority": "Spot", + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A8m_v2", + "capacity": 2, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with spot restore policy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json new file mode 100644 index 0000000000..bf35cef2ea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithSshAuthentication.json @@ -0,0 +1,241 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "fb73af19-0090-467c-9ced-b00bceab1c45", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "fb73af19-0090-467c-9ced-b00bceab1c45", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with ssh authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json new file mode 100644 index 0000000000..cc5ce20998 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithTerminateScheduledEventsEnabled.json @@ -0,0 +1,235 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT5M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT5M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT5M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with terminate scheduled events enabled." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json new file mode 100644 index 0000000000..f054574aa3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUefiSettingsOfSecureBootAndVTpm.json @@ -0,0 +1,238 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "b9e23088-6ffc-46e0-9e02-b0a6eeef47db", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with Uefi Settings of secureBoot and vTPM." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json new file mode 100644 index 0000000000..697f66d879 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithUserData.json @@ -0,0 +1,230 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with userData." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json new file mode 100644 index 0000000000..21f4afe81d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVirtualMachinesInDifferentZones.json @@ -0,0 +1,286 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "centralus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0 + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1 + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 2, + "tier": "Standard" + }, + "zones": [ + "1", + "3" + ] + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "centralus", + "properties": { + "overprovision": true, + "provisioningState": "Succeeded", + "singlePlacementGroup": false, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + }, + "zoneBalance": false + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 2, + "tier": "Standard" + }, + "zones": [ + "1", + "3" + ] + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "centralus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": false, + "uniqueId": "8042c376-4690-4c47-9fa2-fbdad70e32fa", + "upgradePolicy": { + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 512, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + }, + "zoneBalance": false + }, + "sku": { + "name": "Standard_A1_v2", + "capacity": 2, + "tier": "Standard" + }, + "zones": [ + "1", + "3" + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with virtual machines in different zones." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json new file mode 100644 index 0000000000..53ed22fe50 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAScaleSetWithVmSizeProperties.json @@ -0,0 +1,248 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a scale set with vm size properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json new file mode 100644 index 0000000000..f458a589c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionThatHasSuppressFailuresEnabled.json @@ -0,0 +1,280 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a VMSS with an extension that has suppressFailures enabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json new file mode 100644 index 0000000000..353c032fd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateAVmssWithAnExtensionWithProtectedSettingsFromKeyVault.json @@ -0,0 +1,295 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": false, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "publisher": "{extension-Publisher}", + "settings": {}, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create a VMSS with an extension with protectedSettingsFromKeyVault" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json new file mode 100644 index 0000000000..591a1d2e18 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_CreateOrUpdate_CreateOrUpdateAScaleSetWithCapacityReservation.json @@ -0,0 +1,232 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "overprovision": true, + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "{vmss-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + }, + "201": { + "body": { + "name": "{vmss-name}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{vmss-name}", + "location": "westus", + "properties": { + "overprovision": true, + "provisioningState": "Creating", + "singlePlacementGroup": true, + "uniqueId": "d053ec5a-8da6-495f-ab13-38216503c6d7", + "upgradePolicy": { + "mode": "Manual" + }, + "virtualMachineProfile": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": false, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "privateIPAddressVersion": "IPv4", + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/nsgExistingVnet/subnets/nsgExistingSubnet" + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_DS1_v2", + "capacity": 3, + "tier": "Standard" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_CreateOrUpdate", + "title": "Create or update a scale set with capacity reservation." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json new file mode 100644 index 0000000000..fbaf95798f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hibernate": true, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Deallocate", + "title": "VirtualMachineScaleSet_Deallocate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json new file mode 100644 index 0000000000..5913e04233 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Deallocate_VirtualMachineScaleSetDeallocateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Deallocate", + "title": "VirtualMachineScaleSet_Deallocate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json new file mode 100644 index 0000000000..2cc0b68c3d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": "true", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myvmScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachineScaleSets_Delete", + "title": "Force Delete a VM scale set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json new file mode 100644 index 0000000000..396d089b1e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": true, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_DeleteInstances", + "title": "VirtualMachineScaleSet_DeleteInstances_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json new file mode 100644 index 0000000000..78001457b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_DeleteInstances_VirtualMachineScaleSetDeleteInstancesMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_DeleteInstances", + "title": "VirtualMachineScaleSet_DeleteInstances_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json new file mode 100644 index 0000000000..b19900e6e5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "platformUpdateDomain": 30, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "nextPlatformUpdateDomain": 7, + "walkPerformed": true + } + } + }, + "operationId": "VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk", + "title": "VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json new file mode 100644 index 0000000000..3d1b1e0ea3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_VirtualMachineScaleSetForceRecoveryServiceFabricPlatformUpdateDomainWalkMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "platformUpdateDomain": 9, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineScaleSets_ForceRecoveryServiceFabricPlatformUpdateDomainWalk", + "title": "VirtualMachineScaleSet_ForceRecoveryServiceFabricPlatformUpdateDomainWalk_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json new file mode 100644 index 0000000000..ce05803ce0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "orchestrationServices": [ + { + "serviceName": "AutomaticRepairs", + "serviceState": "NotRunning" + } + ], + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaaaaaa", + "time": "2021-11-30T12:58:26.526Z" + } + ], + "virtualMachine": { + "statusesSummary": [ + { + "code": "aa", + "count": 21 + } + ] + }, + "extensions": [ + { + "name": "aaaaaaaaaaa", + "statusesSummary": [ + { + "code": "aa", + "count": 21 + } + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_GetInstanceView", + "title": "VirtualMachineScaleSet_GetInstanceView_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json new file mode 100644 index 0000000000..a1d3cdc46e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetInstanceView_VirtualMachineScaleSetGetInstanceViewMinimumSetGen.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + } + }, + "operationId": "VirtualMachineScaleSets_GetInstanceView", + "title": "VirtualMachineScaleSet_GetInstanceView_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json new file mode 100644 index 0000000000..6ea86625ae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMaximumSetGen.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaa", + "value": [ + { + "type": "aaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaa", + "properties": { + "error": { + "code": "aaaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaaaaaaaa", + "target": "aaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaaa", + "message": "aa", + "target": "aaaa" + } + ] + }, + "progress": { + "failedInstanceCount": 25, + "inProgressInstanceCount": 20, + "pendingInstanceCount": 27, + "successfulInstanceCount": 6 + }, + "rollbackInfo": { + "failedRolledbackInstanceCount": 2, + "rollbackError": { + "code": "aaaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaaaaaaaa", + "target": "aaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaaaaa", + "message": "aa", + "target": "aaaa" + } + ] + }, + "successfullyRolledbackInstanceCount": 12 + }, + "runningStatus": { + "code": "RollingForward", + "endTime": "2021-11-30T13:05:40.443Z", + "startTime": "2021-11-30T13:05:40.442Z" + }, + "startedBy": "Unknown", + "targetImageReference": { + "exactVersion": "aaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + } + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_GetOSUpgradeHistory", + "title": "VirtualMachineScaleSet_GetOSUpgradeHistory_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json new file mode 100644 index 0000000000..e30bbfb24a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_GetOSUpgradeHistory_VirtualMachineScaleSetGetOsUpgradeHistoryMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + {} + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_GetOSUpgradeHistory", + "title": "VirtualMachineScaleSet_GetOSUpgradeHistory_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json new file mode 100644 index 0000000000..e20d629d79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSet.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "westus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get a virtual machine scale set" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json new file mode 100644 index 0000000000..6c37513ced --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetPlacedOnADedicatedHostGroupThroughAutomaticPlacement.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "West US", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get a virtual machine scale set placed on a dedicated host group through automatic placement." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json new file mode 100644 index 0000000000..1a44670334 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetAVirtualMachineScaleSetWithUserData.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "westus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get a virtual machine scale set with UserData" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json new file mode 100644 index 0000000000..91ad404c39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Get_GetVmScaleSetVmWithDiskControllerType.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "myVirtualMachineScaleSet" + }, + "responses": { + "200": { + "body": { + "name": "myVirtualMachineScaleSet", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myVirtualMachineScaleSet", + "location": "westus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "myVirtualMachineScaleSet", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachineScaleSets_Get", + "title": "Get VM scale set VM with Disk Controller Type" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json new file mode 100644 index 0000000000..aa0b79d74b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMaximumSetGen.json @@ -0,0 +1,371 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaa", + "value": [ + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "Default" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true + }, + "mode": "Manual", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": 4 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensions": [ + { + "name": "aa", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aaaaaaaaaaaaaa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ] + }, + "licenseType": "aaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "{vmss-name}", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa", + "domainNameLabelScope": "TenantReuse" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/{existing-virtual-network-name}/subnets/{existing-subnet-name}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "aa" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "aaaaaaaaaaaaaa", + "caching": "None", + "createOption": "FromImage", + "diskIOPSReadWrite": 11, + "diskMBpsReadWrite": 13, + "diskSizeGB": 11, + "lun": 24, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "a", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "aaaaaaaaaaaaaaa", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 30, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + }, + "tags": { + "key8425": "aaa" + }, + "zones": [ + "aaaaaaaaaaaaaaaaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListAll", + "title": "VirtualMachineScaleSet_ListAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json new file mode 100644 index 0000000000..eb4bf8d915 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListAll_VirtualMachineScaleSetListAllMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "westus" + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListAll", + "title": "VirtualMachineScaleSet_ListAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json new file mode 100644 index 0000000000..9316917dbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListByLocation.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "eastus", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "eastus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue1" + } + }, + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}1", + "location": "eastus", + "properties": { + "doNotRunExtensionsOnOverprovisionedVMs": false, + "overprovision": false, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "singlePlacementGroup": false, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "enableAutomaticOSUpgrade": false + }, + "mode": "Automatic" + }, + "virtualMachineProfile": { + "networkProfile": { + "networkInterfaceConfigurations": [ + { + "name": "myNic1", + "properties": { + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "primary": true, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "linuxConfiguration": { + "disablePasswordAuthentication": false + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "databricks", + "publisher": "azuredatabricks", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": { + "myTag1": "tagValue2" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListByLocation", + "title": "Lists all the VM scale sets under the specified subscription for the specified location." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json new file mode 100644 index 0000000000..ea77c03148 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMaximumSetGen.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaa" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaa", + "value": [ + { + "capacity": { + "defaultCapacity": 20, + "maximum": 27, + "minimum": 22, + "scaleType": "Automatic" + }, + "resourceType": "aaaaaaaaaaaaaaaaa", + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + } + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListSkus", + "title": "VirtualMachineScaleSet_ListSkus_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json new file mode 100644 index 0000000000..f2951c9dfa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ListSkus_VirtualMachineScaleSetListSkusMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "value": [ + {} + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_ListSkus", + "title": "VirtualMachineScaleSet_ListSkus_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json new file mode 100644 index 0000000000..3da8110604 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMaximumSetGen.json @@ -0,0 +1,687 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "aaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "Default" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaaaaaaaaaaaaaaaaaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true, + "useRollingUpgradePolicy": true + }, + "mode": "Automatic", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": 4 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensions": [ + { + "name": "aa", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aaaaaaaaaaaaaa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ] + }, + "licenseType": "aaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "myNic", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "customData": "aaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "aa" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "exactVersion": "aaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaa", + "offer": "databricks", + "publisher": "azuredatabricks", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaa", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "name": "aaaaaaaaaaaaaaaaaaaaaaa", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 30, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": {}, + "zones": [ + "aaaaaaa" + ] + }, + { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}1", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "aaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "Default" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true, + "useRollingUpgradePolicy": true + }, + "mode": "Automatic", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": 4 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "extensions": [ + { + "name": "aa", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aaaaaaaaaaaaaa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + } + ] + }, + "licenseType": "aaaaaaaaaaaaaaaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/restorePointCollections/rpcName/restorePoints/restorePointName/diskRestorePoints/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f_22b4bdfe-6c54-4f72-84d8-85d8860f0c57" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "myNic1", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "myIPConfig", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 18, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/myVNet/subnets/mySubnet" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/myNetworkSecurityGroup" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerNamePrefix": "{virtualMachineScaleSetName}", + "customData": "a", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaa", + "keyData": "aaaaaa" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "aa" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "exactVersion": "aa", + "id": "aaa", + "offer": "databricks", + "publisher": "azuredatabricks", + "sharedGalleryImageId": "aaaaaaa", + "sku": "databricksworker", + "version": "3.15.2" + }, + "osDisk": { + "name": "a", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 30, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aaaaaaaaaaaaaaaa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D2s_v3", + "capacity": 4, + "tier": "Standard" + }, + "tags": {}, + "zones": [ + "aaaaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_List", + "title": "VirtualMachineScaleSet_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json new file mode 100644 index 0000000000..64469f8897 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_List_VirtualMachineScaleSetListMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "eastus" + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "location": "eastus" + } + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_List", + "title": "VirtualMachineScaleSet_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json new file mode 100644 index 0000000000..405b4c18c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PerformMaintenance", + "title": "VirtualMachineScaleSet_PerformMaintenance_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json new file mode 100644 index 0000000000..a76bc9c13c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PerformMaintenance_VirtualMachineScaleSetPerformMaintenanceMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PerformMaintenance", + "title": "VirtualMachineScaleSet_PerformMaintenance_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json new file mode 100644 index 0000000000..d32fc4311d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "skipShutdown": true, + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PowerOff", + "title": "VirtualMachineScaleSet_PowerOff_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json new file mode 100644 index 0000000000..fb7eec01b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_PowerOff_VirtualMachineScaleSetPowerOffMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "a" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_PowerOff", + "title": "VirtualMachineScaleSet_PowerOff_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json new file mode 100644 index 0000000000..870fb81976 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "VirtualMachineScaleSetReapplyTestRG", + "subscriptionId": "b4f1213b-cacc-4816-8bfb-f30f90643de8", + "vmScaleSetName": "VMSSReapply-Test-ScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/b4f1213b-cacc-4816-8bfb-f30f90643de8/providers/Microsoft.Compute/locations/eastus/operationResults/c57dff56-0cd2-4e24-8d11-4e18d77f7e85?api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reapply", + "title": "VirtualMachineScaleSets_Reapply_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json new file mode 100644 index 0000000000..48a07baf44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reapply_VirtualMachineScaleSetsReapplyMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "VirtualMachineScaleSetReapplyTestRG", + "subscriptionId": "b4f1213b-cacc-4816-8bfb-f30f90643de8", + "vmScaleSetName": "VMSSReapply-Test-ScaleSet" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://management.azure.com/subscriptions/b4f1213b-cacc-4816-8bfb-f30f90643de8/providers/Microsoft.Compute/locations/eastus/operationResults/c57dff56-0cd2-4e24-8d11-4e18d77f7e85?api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reapply", + "title": "VirtualMachineScaleSets_Reapply_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json new file mode 100644 index 0000000000..75c2022cf2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Redeploy", + "title": "VirtualMachineScaleSet_Redeploy_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json new file mode 100644 index 0000000000..6edf0242b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Redeploy_VirtualMachineScaleSetRedeployMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Redeploy", + "title": "VirtualMachineScaleSet_Redeploy_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json new file mode 100644 index 0000000000..3382bad359 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_ReimageAll", + "title": "VirtualMachineScaleSet_ReimageAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json new file mode 100644 index 0000000000..952dfb4a45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_ReimageAll_VirtualMachineScaleSetReimageAllMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_ReimageAll", + "title": "VirtualMachineScaleSet_ReimageAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json new file mode 100644 index 0000000000..e2e4b6da3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "vmScaleSetReimageInput": { + "instanceIds": [ + "aaaaaaaaaa" + ], + "tempDisk": true + } + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reimage", + "title": "VirtualMachineScaleSet_Reimage_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json new file mode 100644 index 0000000000..930fc7e6fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Reimage_VirtualMachineScaleSetReimageMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Reimage", + "title": "VirtualMachineScaleSet_Reimage_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json new file mode 100644 index 0000000000..edebb48c79 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Restart", + "title": "VirtualMachineScaleSet_Restart_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json new file mode 100644 index 0000000000..c705b54fab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Restart_VirtualMachineScaleSetRestartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Restart", + "title": "VirtualMachineScaleSet_Restart_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json new file mode 100644 index 0000000000..4f5288337f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMaximumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "action": "Resume", + "serviceName": "AutomaticRepairs" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_SetOrchestrationServiceState", + "title": "VirtualMachineScaleSet_SetOrchestrationServiceState_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json new file mode 100644 index 0000000000..403c6c3788 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_SetOrchestrationServiceState_VirtualMachineScaleSetSetOrchestrationServiceStateMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "action": "Resume", + "serviceName": "AutomaticRepairs" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_SetOrchestrationServiceState", + "title": "VirtualMachineScaleSet_SetOrchestrationServiceState_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json new file mode 100644 index 0000000000..a86bf1c641 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Start", + "title": "VirtualMachineScaleSet_Start_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json new file mode 100644 index 0000000000..ec9ebd34c5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Start_VirtualMachineScaleSetStartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Start", + "title": "VirtualMachineScaleSet_Start_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json new file mode 100644 index 0000000000..d5d4a2f263 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_UpdateInstances", + "title": "VirtualMachineScaleSet_UpdateInstances_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json new file mode 100644 index 0000000000..b33f4b807f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_UpdateInstances_VirtualMachineScaleSetUpdateInstancesMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmInstanceIDs": { + "instanceIds": [ + "aaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "vmScaleSetName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachineScaleSets_UpdateInstances", + "title": "VirtualMachineScaleSet_UpdateInstances_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json new file mode 100644 index 0000000000..c1fd83d2c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMaximumSetGen.json @@ -0,0 +1,651 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "key3951": {} + } + }, + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "promotionCode": "aaaaaaaaaa", + "publisher": "microsoft-ads" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT30M" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "overprovision": true, + "proximityPlacementGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true + }, + "mode": "Manual", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true, + "rollbackFailedInstancesOnPolicyBreach": true + } + }, + "virtualMachineProfile": { + "billingProfile": { + "maxPrice": -1 + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "licenseType": "aaaaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "applicationSecurityGroups": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "a", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 3 + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + } + } + ], + "networkSecurityGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + }, + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "caching": "None", + "createOption": "Empty", + "diskIOPSReadWrite": 28, + "diskMBpsReadWrite": 15, + "diskSizeGB": 1023, + "lun": 26, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "id": "aaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "caching": "ReadWrite", + "diskSizeGB": 6, + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "vhdContainers": [ + "aa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaa" + } + }, + "sku": { + "name": "DSv3-Type1", + "capacity": 7, + "tier": "aaa" + }, + "tags": { + "key246": "aaaaaaaaaaaaaaaaaaaaaaaa" + } + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "name": "{virtualMachineScaleSetName}", + "type": "Microsoft.Compute/virtualMachineScaleSets", + "extendedLocation": { + "name": "aaaaaaaaaaaaaaaaaaaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaa", + "tenantId": "aaaaaaaaaaaaaaaa", + "userAssignedIdentities": { + "key3951": { + "clientId": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "principalId": "aaaa" + } + } + }, + "location": "westus", + "plan": { + "name": "aaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "automaticRepairsPolicy": { + "enabled": true, + "gracePeriod": "PT30M" + }, + "doNotRunExtensionsOnOverprovisionedVMs": true, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "orchestrationMode": "Uniform", + "overprovision": true, + "platformFaultDomainCount": 1, + "provisioningState": "succeeded", + "proximityPlacementGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "scaleInPolicy": { + "forceDeletion": true, + "rules": [ + "OldestVM" + ] + }, + "singlePlacementGroup": true, + "spotRestorePolicy": { + "enabled": true, + "restoreTimeout": "aaaaaaaaaa" + }, + "uniqueId": "aaaaaaaa", + "upgradePolicy": { + "automaticOSUpgradePolicy": { + "disableAutomaticRollback": true, + "enableAutomaticOSUpgrade": true + }, + "mode": "Manual", + "rollingUpgradePolicy": { + "enableCrossZoneUpgrade": true, + "maxBatchInstancePercent": 49, + "maxSurge": true, + "maxUnhealthyInstancePercent": 81, + "maxUnhealthyUpgradedInstancePercent": 98, + "pauseTimeBetweenBatches": "aaaaaaaaaaaaaaa", + "prioritizeUnhealthyInstances": true + } + }, + "virtualMachineProfile": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaa", + "order": 29, + "packageReferenceId": "aaaaaaaaaa", + "tags": "aaaaaaaaaaa" + } + ] + }, + "billingProfile": { + "maxPrice": -1 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "evictionPolicy": "Deallocate", + "extensionProfile": { + "extensionsTimeBudget": "PT1H20M", + "extensions": [ + { + "name": "{extension-name}", + "type": "aaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "type": "{extension-Type}", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaa", + "protectedSettings": {}, + "provisionAfterExtensions": [ + "aa" + ], + "provisioningState": "aaaaaaaaaaaaaa", + "publisher": "{extension-Publisher}", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "{handler-version}" + } + } + ] + }, + "licenseType": "aaaaaaaaaaaa", + "networkProfile": { + "healthProbe": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + }, + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaa" + ] + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "applicationSecurityGroups": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "loadBalancerInboundNatPools": [ + { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "a", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaaaaaaaaaaaaaaa" + }, + "idleTimeoutInMinutes": 3, + "ipTags": [ + { + "ipTagType": "aaaaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/disk123" + } + } + } + ], + "networkSecurityGroup": { + "id": "subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/snapshots/mySnapshot" + }, + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerNamePrefix": "{vmss-name}", + "customData": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [ + { + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vaultCertificates": [ + { + "certificateStore": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "certificateUrl": "aaaaaaa" + } + ] + } + ], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "automaticByPlatformSettings": { + "rebootSetting": "Never" + }, + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "priority": "Regular", + "scheduledEventsProfile": { + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "caching": "None", + "createOption": "Empty", + "diskIOPSReadWrite": 28, + "diskMBpsReadWrite": 15, + "diskSizeGB": 1023, + "lun": 26, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "writeAcceleratorEnabled": true + } + ], + "imageReference": { + "exactVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaa", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "aaaaaaaaaaaaaaa", + "caching": "ReadWrite", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 6, + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaa" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhdContainers": [ + "aa" + ], + "writeAcceleratorEnabled": true + } + }, + "userData": "aaaaaaaaaaaaa" + }, + "zoneBalance": true + }, + "sku": { + "name": "Standard_D1_v2", + "capacity": 3, + "tier": "Standard" + }, + "tags": { + "key8425": "aaa" + }, + "zones": [ + "aaaaaaaaaaaaaaaaaaaa" + ] + } + } + }, + "operationId": "VirtualMachineScaleSets_Update", + "title": "VirtualMachineScaleSet_Update_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json new file mode 100644 index 0000000000..e1358da5c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachineScaleSets_Update_VirtualMachineScaleSetUpdateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": {}, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmScaleSetName": "aaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "location": "westus" + } + } + }, + "operationId": "VirtualMachineScaleSets_Update", + "title": "VirtualMachineScaleSet_Update_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json new file mode 100644 index 0000000000..da0de82006 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_AssessPatches.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroupName", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": { + "body": { + "assessmentActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "availablePatches": [ + { + "name": "Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.279.1373.0)", + "activityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "assessmentState": "Available", + "classifications": [ + "Definition Updates" + ], + "kbId": "2267602", + "lastModifiedDateTime": "2020-04-24T21:18:45.2830263Z", + "patchId": "35428702-5784-4ba4-a6e0-5222258b5411", + "publishedDate": "2018-11-07T00:00:00Z", + "rebootBehavior": "NeverReboots", + "version": "" + }, + { + "name": "Windows Malicious Software Removal Tool x64 - October 2018 (KB890830)", + "activityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "assessmentState": "Available", + "classifications": [ + "Update Rollups" + ], + "kbId": "890830", + "lastModifiedDateTime": "2020-04-24T21:18:45.2830263Z", + "patchId": "39f9cdd1-795c-4d0e-8c0a-73ab3f31746d", + "publishedDate": "2018-11-07T00:00:00Z", + "rebootBehavior": "CanRequestReboot", + "version": "" + } + ], + "criticalAndSecurityPatchCount": 1, + "error": null, + "otherPatchCount": 2, + "rebootPending": true, + "startDateTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_AssessPatches", + "title": "Assess patch state of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json new file mode 100644 index 0000000000..fa23bbf5ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMaximumSetGen.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "destinationContainerName": "aaaaaaa", + "overwriteVhds": true, + "vhdPrefix": "aaaaaaaaa" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": { + "$schema": "aaaaa", + "contentVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaa", + "parameters": {}, + "resources": [ + {} + ] + } + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Capture", + "title": "VirtualMachine_Capture_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json new file mode 100644 index 0000000000..a98faf8f4c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Capture_VirtualMachineCaptureMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "destinationContainerName": "aaaaaaa", + "overwriteVhds": true, + "vhdPrefix": "aaaaaaaaa" + }, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaa" + }, + "responses": { + "200": { + "body": {} + }, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Capture", + "title": "VirtualMachine_Capture_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json new file mode 100644 index 0000000000..a9fc863c64 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_ConvertToManagedDisks", + "title": "VirtualMachine_ConvertToManagedDisks_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json new file mode 100644 index 0000000000..f7ecf9f20e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ConvertToManagedDisks_VirtualMachineConvertToManagedDisksMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_ConvertToManagedDisks", + "title": "VirtualMachine_ConvertToManagedDisks_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json new file mode 100644 index 0000000000..26cf45ed6c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateACustomImageVmFromAnUnmanagedGeneralizedOsImage.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "926cd555-a07c-4ff5-b214-4aa4dd09d79b" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "image": { + "uri": "https://{existing-storage-account-name}.blob.core.windows.net/system/Microsoft.Compute/Images/vhds/{existing-generalized-os-image-blob-name}.vhd" + }, + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "926cd555-a07c-4ff5-b214-4aa4dd09d79b" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a custom-image vm from an unmanaged generalized os image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json new file mode 100644 index 0000000000..962d081720 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingAssessmentModeOfImageDefault.json @@ -0,0 +1,165 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch setting assessmentMode of ImageDefault." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json new file mode 100644 index 0000000000..550945c307 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json @@ -0,0 +1,180 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": true, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": true, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": true, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json new file mode 100644 index 0000000000..a30a8beb6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingPatchModeOfImageDefault.json @@ -0,0 +1,165 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch setting patchMode of ImageDefault." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json new file mode 100644 index 0000000000..59f9e1c826 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateALinuxVmWithAPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Linux vm with a patch settings patchMode and assessmentMode set to AutomaticByPlatform." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json new file mode 100644 index 0000000000..977e3459fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAPlatformImageVmWithUnmanagedOsAndDataDisks.json @@ -0,0 +1,215 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk0.vhd" + } + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk1.vhd" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/{existing-container-name}/myDisk.vhd" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk0", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk0.vhd" + } + }, + { + "name": "dataDisk1", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk1.vhd" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "5230a749-2f68-4830-900b-702182d32e63" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "name": "dataDisk0", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk0.vhd" + } + }, + { + "name": "dataDisk1", + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk1.vhd" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "osType": "Windows", + "vhd": { + "uri": "http://{existing-storage-account-name}.blob.core.windows.net/vhds/myDisk.vhd" + } + } + }, + "vmId": "5230a749-2f68-4830-900b-702182d32e63" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a platform-image vm with unmanaged os and data disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json new file mode 100644 index 0000000000..51016e0891 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACommunityGalleryImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "/CommunityGalleries/galleryPublicName/Images/communityGalleryImageName/Versions/communityGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM from a community gallery image" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json new file mode 100644 index 0000000000..ef5623ae64 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromACustomImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm from a custom image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json new file mode 100644 index 0000000000..38d5c1bb6b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromAGeneralizedSharedImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm from a generalized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json new file mode 100644 index 0000000000..f877390de2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASharedGalleryImage.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "sharedGalleryImageId": "/SharedGalleries/sharedGalleryName/Images/sharedGalleryImageName/Versions/sharedGalleryImageVersionName" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM from a shared gallery image" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json new file mode 100644 index 0000000000..8f17786f4f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmFromASpecializedSharedImage.json @@ -0,0 +1,125 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "storageProfile": { + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/mySharedGallery/images/mySharedImage" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm from a specialized shared image." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json new file mode 100644 index 0000000000..2086678dae --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAVirtualMachineScaleSetWithCustomerAssignedPlatformFaultDomain.json @@ -0,0 +1,167 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "platformFaultDomain": 1, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/{existing-flex-vmss-name-with-platformFaultDomainCount-greater-than-1}" + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "platformFaultDomain": 1, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myExistingFlexVmss" + }, + "vmId": "7cce54f2-ecd3-4ddd-a8d9-50984faa3918" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "platformFaultDomain": 1, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets/myExistingFlexVmss" + }, + "vmId": "7cce54f2-ecd3-4ddd-a8d9-50984faa3918" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm in a Virtual Machine Scale Set with customer assigned platformFaultDomain." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json new file mode 100644 index 0000000000..a418e36e4b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmInAnAvailabilitySet.json @@ -0,0 +1,164 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/{existing-availability-set-name}" + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/NSGEXISTINGAS" + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/NSGEXISTINGAS" + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm in an availability set." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json new file mode 100644 index 0000000000..1abf092cd0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAMarketplaceImagePlan.json @@ -0,0 +1,170 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with a marketplace image plan." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json new file mode 100644 index 0000000000..86d25ffc9a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithAnExtensionsTimeBudget.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT30M", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT30M", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT30M", + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with an extensions time budget." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json new file mode 100644 index 0000000000..d93eb90122 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithApplicationProfile.json @@ -0,0 +1,210 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "enableAutomaticUpgrade": false, + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1", + "treatFailureAsDeploymentFailure": false + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "{image_offer}", + "publisher": "{image_publisher}", + "sku": "{image_sku}", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with Application Profile." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json new file mode 100644 index 0000000000..c98ae3dbb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithBootDiagnostics.json @@ -0,0 +1,173 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json new file mode 100644 index 0000000000..9948792a83 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskControllerType.json @@ -0,0 +1,177 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "U29tZSBDdXN0b20gRGF0YQ==" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with Disk Controller Type" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json new file mode 100644 index 0000000000..7152bc3882 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithDiskEncryptionSetResourceIdInTheOsDiskAndDataDisk.json @@ -0,0 +1,231 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}", + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/{existing-custom-image-name}" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}", + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskencryptionset-name}" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": false + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/{existing-managed-disk-name}", + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/images/nsgcustom" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "71aa3d5a-d73d-4970-9182-8580433b2865" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with DiskEncryptionSet resource id in the os disk and data disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json new file mode 100644 index 0000000000..0b03c7b392 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEmptyDataDisks.json @@ -0,0 +1,207 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0 + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1 + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with empty data disks." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json new file mode 100644 index 0000000000..5d1e216dcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDisk.json @@ -0,0 +1,179 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ephemeral os disk." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json new file mode 100644 index 0000000000..256609f3e1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInCacheDiskUsingPlacementProperty.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ephemeral os disk provisioning in Cache disk using placement property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json new file mode 100644 index 0000000000..6b5b3c8092 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithEphemeralOsDiskProvisioningInResourceDiskUsingPlacementProperty.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "diffDiskSettings": { + "option": "Local", + "placement": "ResourceDisk" + }, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ephemeral os disk provisioning in Resource disk using placement property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json new file mode 100644 index 0000000000..4bbc5eea57 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHibernationEnabled.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "eastus2euap", + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "{vm-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "eastus2euap", + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "eastus2euap", + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2019-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with HibernationEnabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json new file mode 100644 index 0000000000..a6e4fe263c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithHostEncryptionUsingEncryptionAtHostProperty.json @@ -0,0 +1,179 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "encryptionAtHost": true + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with Host Encryption using encryptionAtHost property." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json new file mode 100644 index 0000000000..b7870ae6bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithManagedBootDiagnostics.json @@ -0,0 +1,170 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with managed boot diagnostics." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json new file mode 100644 index 0000000000..82b4631aa9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfiguration.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{nic-config-name}", + "properties": { + "deleteOption": "Delete", + "ipConfigurations": [ + { + "name": "{ip-config-name}", + "properties": { + "primary": true, + "publicIPAddressConfiguration": { + "name": "{publicIP-config-name}", + "properties": { + "deleteOption": "Detach", + "publicIPAllocationMethod": "Static" + }, + "sku": { + "name": "Basic", + "tier": "Global" + } + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with network interface configuration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json new file mode 100644 index 0000000000..8898c1550f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithNetworkInterfaceConfigurationWithPublicIpAddressDnsSettings.json @@ -0,0 +1,180 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkApiVersion": "2020-11-01", + "networkInterfaceConfigurations": [ + { + "name": "{nic-config-name}", + "properties": { + "deleteOption": "Delete", + "ipConfigurations": [ + { + "name": "{ip-config-name}", + "properties": { + "primary": true, + "publicIPAddressConfiguration": { + "name": "{publicIP-config-name}", + "properties": { + "deleteOption": "Detach", + "dnsSettings": { + "domainNameLabel": "aaaaa", + "domainNameLabelScope": "TenantReuse" + }, + "publicIPAllocationMethod": "Static" + }, + "sku": { + "name": "Basic", + "tier": "Global" + } + } + } + } + ], + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/toBeCreatedNetworkInterface", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b7a098cc-b0b8-46e8-a205-62f301a62a8f" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with network interface configuration with public ip address dns settings" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json new file mode 100644 index 0000000000..77ea8dec99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPasswordAuthentication.json @@ -0,0 +1,155 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b248db33-62ba-4d2d-b791-811e075ee0f5" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "b248db33-62ba-4d2d-b791-811e075ee0f5" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with password authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json new file mode 100644 index 0000000000..0a16104dfc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithPremiumStorage.json @@ -0,0 +1,155 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with premium storage." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json new file mode 100644 index 0000000000..27238dd00f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithScheduledEventsProfile.json @@ -0,0 +1,203 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with Scheduled Events Profile" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json new file mode 100644 index 0000000000..fe4ffc0595 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithCustomerManagedKeys.json @@ -0,0 +1,192 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "diskEncryptionSet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/diskEncryptionSets/{existing-diskEncryptionSet-name}" + }, + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with securityType ConfidentialVM with Customer Managed Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json new file mode 100644 index 0000000000..7b465816bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSecurityTypeConfidentialVmWithPlatformManagedKeys.json @@ -0,0 +1,183 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DC2as_v5" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "ConfidentialVM", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "2019-datacenter-cvm", + "publisher": "MicrosoftWindowsServer", + "sku": "windows-cvm", + "version": "17763.2183.2109130127" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "securityProfile": { + "securityEncryptionType": "DiskWithVMGuestState" + }, + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with securityType ConfidentialVM with Platform Managed Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json new file mode 100644 index 0000000000..a8dbf2c1af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithSshAuthentication.json @@ -0,0 +1,179 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + } + }, + "storageProfile": { + "imageReference": { + "offer": "{image_offer}", + "publisher": "{image_publisher}", + "sku": "{image_sku}", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "ssh": { + "publicKeys": [ + { + "path": "/home/{your-username}/.ssh/authorized_keys", + "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeClRAk2ipUs/l5voIsDC5q9RI+YSRd1Bvd/O+axgY4WiBzG+4FwJWZm/mLLe5DoOdHQwmU2FrKXZSW4w2sYE70KeWnrFViCOX5MTVvJgPE8ClugNl8RWth/tU849DvM9sT7vFgfVSHcAS2yDRyDlueii+8nF2ym8XWAPltFVCyLHRsyBp5YPqK8JFYIa1eybKsY3hEAxRCA+/7bq8et+Gj3coOsuRmrehav7rE6N12Pb80I6ofa6SM5XNYq4Xk0iYNx7R3kdz0Jj9XgZYWjAHjJmT0gTRoOnt6upOuxK7xI/ykWrllgpXrCPu3Ymz+c+ujaqcxDopnAl2lmf69/J1" + } + ] + } + }, + "secrets": [] + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "UbuntuServer", + "publisher": "Canonical", + "sku": "16.04-LTS", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Linux" + } + }, + "vmId": "e0de9b84-a506-4b95-9623-00a425d05c90" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a vm with ssh authentication." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json new file mode 100644 index 0000000000..a7bb9b4989 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUefiSettingsOfSecureBootAndVTpm.json @@ -0,0 +1,176 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "securityProfile": { + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "windowsserver-gen2preview-preview", + "publisher": "MicrosoftWindowsServer", + "sku": "windows10-tvm", + "version": "18363.592.2001092016" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with Uefi Settings of secureBoot and vTPM." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json new file mode 100644 index 0000000000..2d515e7c7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithUserData.json @@ -0,0 +1,174 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "{vm-name}" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "{vm-name}" + }, + "responses": { + "200": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "{vm-name}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/{vm-name}", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "{vm-name}", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "vmOSdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with UserData" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json new file mode 100644 index 0000000000..0ae5a984c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAVmWithVmSizeProperties.json @@ -0,0 +1,186 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{existing-storage-account-name}.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + }, + "userData": "U29tZSBDdXN0b20gRGF0YQ==" + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://nsgdiagnostic.blob.core.windows.net" + } + }, + "hardwareProfile": { + "vmSize": "Standard_D4_v3", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "676420ba-7a24-4bfe-80bd-9c841ee184fa" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a VM with VM Size Properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json new file mode 100644 index 0000000000..85788a0331 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingAssessmentModeOfImageDefault.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "patchSettings": { + "assessmentMode": "ImageDefault" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting assessmentMode of ImageDefault." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json new file mode 100644 index 0000000000..e907aa0ee5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByOs.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of AutomaticByOS." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json new file mode 100644 index 0000000000..5530b373e9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndAutomaticByPlatformSettings.json @@ -0,0 +1,183 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": false, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": false, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "automaticByPlatformSettings": { + "bypassPlatformSafetyChecksOnUserSchedule": false, + "rebootSetting": "Never" + }, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and AutomaticByPlatformSettings." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json new file mode 100644 index 0000000000..e779a3342a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfAutomaticByPlatformAndEnableHotpatchingSetToTrue.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "enableHotpatching": true, + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of AutomaticByPlatform and enableHotpatching set to true." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json new file mode 100644 index 0000000000..62b26ad4b8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithAPatchSettingPatchModeOfManual.json @@ -0,0 +1,168 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "Manual" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "Manual" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "patchSettings": { + "patchMode": "Manual" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with a patch setting patchMode of Manual." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json new file mode 100644 index 0000000000..3d3c132919 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateAWindowsVmWithPatchSettingsPatchModeAndAssessmentModeSetToAutomaticByPlatform.json @@ -0,0 +1,171 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM", + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "storageProfile": { + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "AutomaticByPlatform", + "patchMode": "AutomaticByPlatform" + }, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "a149cd25-409f-41af-8088-275f5486bc93" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create a Windows vm with patch settings patchMode and assessmentMode set to AutomaticByPlatform." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json new file mode 100644 index 0000000000..e5a5af6be8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_CreateOrUpdate_CreateOrUpdateAVmWithCapacityReservation.json @@ -0,0 +1,185 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "location": "westus", + "plan": { + "name": "windows2016", + "product": "windows-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "imageReference": { + "offer": "windows-data-science-vm", + "publisher": "microsoft-ads", + "sku": "windows2016", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + }, + "201": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "plan": { + "name": "standard-data-science-vm", + "product": "standard-data-science-vm", + "publisher": "microsoft-ads" + }, + "properties": { + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/{crgName}" + } + }, + "hardwareProfile": { + "vmSize": "Standard_DS1_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Creating", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "standard-data-science-vm", + "publisher": "microsoft-ads", + "sku": "standard-data-science-vm", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadOnly", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "5c0d55a7-c407-4ed6-bf7d-ddb810267c85" + } + } + } + }, + "operationId": "VirtualMachines_CreateOrUpdate", + "title": "Create or update a VM with capacity reservation" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json new file mode 100644 index 0000000000..d12681ea9a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "hibernate": true, + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Deallocate", + "title": "VirtualMachine_Deallocate_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json new file mode 100644 index 0000000000..f554dc2f24 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Deallocate_VirtualMachineDeallocateMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Deallocate", + "title": "VirtualMachine_Deallocate_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json new file mode 100644 index 0000000000..881a81b188 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "forceDeletion": "true", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + }, + "204": {} + }, + "operationId": "VirtualMachines_Delete", + "title": "Force delete a VM" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json new file mode 100644 index 0000000000..69d1fa0cbf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Generalize.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": {} + }, + "operationId": "VirtualMachines_Generalize", + "title": "Generalize a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json new file mode 100644 index 0000000000..3efe01156f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachine.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT50M", + "hardwareProfile": { + "vmSize": "Standard_DS3_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/proximityPlacementGroups/my-ppg01" + }, + "storageProfile": { + "dataDisks": [ + { + "name": "myDataDisk0", + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 30, + "lun": 0, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0", + "storageAccountType": "Premium_LRS" + } + }, + { + "name": "myDataDisk1", + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 100, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1", + "storageAccountType": "Premium_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "timeCreated": "2021-06-27T01:02:38.3138469+00:00", + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "west us", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json new file mode 100644 index 0000000000..8e7677c748 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "hostGroup": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a virtual machine placed on a dedicated host group through automatic placement" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json new file mode 100644 index 0000000000..c9698a7d88 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithDiskControllerTypeProperties.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$expand": "userData", + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT50M", + "hardwareProfile": { + "vmSize": "Standard_DS3_v2", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "myDataDisk0", + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 30, + "lun": 0, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0", + "storageAccountType": "Premium_LRS" + } + }, + { + "name": "myDataDisk1", + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 100, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1", + "storageAccountType": "Premium_LRS" + } + } + ], + "diskControllerType": "NVMe", + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "west us", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a virtual machine with Disk Controller Type Properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json new file mode 100644 index 0000000000..27a4c24b23 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Get_GetAVirtualMachineWithVmSizeProperties.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "expand": "UserData", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "West US", + "properties": { + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "https://mystorageaccount.blob.core.windows.net/configurations/settings.config", + "order": 1, + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdb/resourceGroups/myresourceGroupName2/providers/Microsoft.Compute/galleries/myGallery1/applications/MyApplication1/versions/1.0", + "tags": "myTag1" + }, + { + "packageReferenceId": "/subscriptions/32c17a9e-aa7b-4ba5-a45b-e324116b6fdg/resourceGroups/myresourceGroupName3/providers/Microsoft.Compute/galleries/myGallery2/applications/MyApplication2/versions/1.1" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/availabilitySets/my-AvailabilitySet" + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "http://{myStorageAccount}.blob.core.windows.net" + } + }, + "extensionsTimeBudget": "PT50M", + "hardwareProfile": { + "vmSize": "Standard_DS3_v2", + "vmSizeProperties": { + "vCPUsAvailable": 1, + "vCPUsPerCore": 1 + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{myNIC}" + } + ] + }, + "osProfile": { + "adminUsername": "admin", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": false, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [ + { + "name": "myDataDisk0", + "caching": "ReadWrite", + "createOption": "Empty", + "diskSizeGB": 30, + "lun": 0, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk0", + "storageAccountType": "Premium_LRS" + } + }, + { + "name": "myDataDisk1", + "caching": "ReadWrite", + "createOption": "Attach", + "diskSizeGB": 100, + "lun": 1, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myDataDisk1", + "storageAccountType": "Premium_LRS" + } + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myOsDisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "diskSizeGB": 30, + "managedDisk": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/myOsDisk", + "storageAccountType": "Premium_LRS" + }, + "osType": "Windows" + } + }, + "userData": "RXhhbXBsZSBVc2VyRGF0YQ==", + "vmId": "0f47b100-583c-48e3-a4c0-aefc2c9bbcc1" + }, + "resources": [ + { + "name": "CustomScriptExtension-DSC", + "type": "Microsoft.Compute/virtualMachines/extensions", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM/extensions/CustomScriptExtension-DSC", + "location": "west us", + "properties": { + "type": "CustomScriptExtension", + "autoUpgradeMinorVersion": true, + "provisioningState": "Succeeded", + "publisher": "Microsoft.Compute", + "settings": {}, + "typeHandlerVersion": "1.9" + }, + "tags": { + "displayName": "CustomScriptExtension-DSC" + } + } + ], + "tags": { + "myTag1": "tagValue1" + } + } + } + }, + "operationId": "VirtualMachines_Get", + "title": "Get a virtual machine with VM Size Properties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json new file mode 100644 index 0000000000..1de54ae2f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstallPatches.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "installPatchesInput": { + "maximumDuration": "PT4H", + "rebootSetting": "IfRequired", + "windowsParameters": { + "classificationsToInclude": [ + "Critical", + "Security" + ], + "maxPatchPublishDate": "2020-11-19T02:36:43.0539904+00:00" + } + }, + "resourceGroupName": "myResourceGroupName", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": { + "body": { + "error": null, + "excludedPatchCount": 0, + "failedPatchCount": 0, + "installationActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "installedPatchCount": 3, + "maintenanceWindowExceeded": false, + "notSelectedPatchCount": 0, + "patches": [ + { + "name": "Definition Update for Windows Defender Antivirus - KB2267602 (Definition 1.279.1373.0)", + "classifications": [ + "Definition Updates" + ], + "installationState": "Installed", + "kbId": "2267602", + "patchId": "35428702-5784-4ba4-a6e0-5222258b5411", + "version": "" + }, + { + "name": "Windows Malicious Software Removal Tool x64 - October 2018 (KB890830)", + "classifications": [ + "Update Rollups" + ], + "installationState": "Pending", + "kbId": "890830", + "patchId": "39f9cdd1-795c-4d0e-8c0a-73ab3f31746d", + "version": "" + } + ], + "pendingPatchCount": 2, + "rebootStatus": "Completed", + "startDateTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_InstallPatches", + "title": "Install patch state of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json new file mode 100644 index 0000000000..83a757edc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetInstanceViewOfAVirtualMachinePlacedOnADedicatedHostGroupThroughAutomaticPlacement.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "assignedHost": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/hostGroups/myHostGroup/hosts/myHost", + "computerName": "myVM", + "disks": [ + { + "name": "myOsDisk", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2023-07-01T21:29:47.477089+00:00" + } + ] + } + ], + "hyperVGeneration": "V1", + "osName": "Windows Server 2016 Datacenter", + "osVersion": "Microsoft Windows NT 10.0.14393.0", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2023-07-01T21:30:12.8051917+00:00" + }, + { + "code": "PowerState/running", + "displayStatus": "VM running", + "level": "Info" + } + ], + "vmAgent": { + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Ready", + "level": "Info", + "message": "GuestAgent is running and accepting new configurations.", + "time": "2023-07-01T23:11:22+00:00" + } + ], + "vmAgentVersion": "2.7.41491.949" + } + } + } + }, + "operationId": "VirtualMachines_InstanceView", + "title": "Get instance view of a virtual machine placed on a dedicated host group through automatic placement." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json new file mode 100644 index 0000000000..a2877fcae4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_InstanceView_GetVirtualMachineInstanceView.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "bootDiagnostics": { + "consoleScreenshotBlobUri": "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.screenshot.bmp", + "serialConsoleLogBlobUri": "https://{myStorageAccount}.blob.core.windows.net/bootdiagnostics-myOsDisk/myOsDisk.serialconsole.log" + }, + "computerName": "myVM", + "disks": [ + { + "name": "myOsDisk", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2019-10-14T21:29:47.477089+00:00" + } + ] + }, + { + "name": "myDataDisk0", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2019-10-14T21:29:47.461517+00:00" + } + ] + } + ], + "hyperVGeneration": "V1", + "osName": "Windows Server 2016 Datacenter", + "osVersion": "Microsoft Windows NT 10.0.14393.0", + "patchStatus": { + "availablePatchSummary": { + "assessmentActivityId": "68f8b292-dfc2-4646-9781-33cc88631968", + "criticalAndSecurityPatchCount": 1, + "error": null, + "lastModifiedTime": "2020-04-24T21:02:04.2556154Z", + "otherPatchCount": 2, + "rebootPending": true, + "startTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + }, + "configurationStatuses": [ + { + "code": "PatchModeConfigurationState/Ready", + "displayStatus": "Status_PatchModeConfigurationState_Ready", + "level": "Info", + "time": "2020-04-24T21:02:04.2556154Z" + }, + { + "code": "AssessmentModeConfigurationState/Pending", + "displayStatus": "Status_AssessmentModeConfigurationState_Pending", + "level": "Info", + "time": "2020-04-24T21:02:04.2556154Z" + } + ], + "lastPatchInstallationSummary": { + "error": null, + "excludedPatchCount": 1, + "failedPatchCount": 1, + "installationActivityId": "68f8b292-dfc2-4646-9981-33cc88631968", + "installedPatchCount": 1, + "lastModifiedTime": "2020-04-24T21:02:04.2556154Z", + "maintenanceWindowExceeded": false, + "notSelectedPatchCount": 1, + "pendingPatchCount": 1, + "startTime": "2020-04-24T21:02:04.2556154Z", + "status": "Succeeded" + } + }, + "platformFaultDomain": 1, + "platformUpdateDomain": 1, + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "time": "2019-10-14T21:30:12.8051917+00:00" + }, + { + "code": "PowerState/running", + "displayStatus": "VM running", + "level": "Info" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "Microsoft.Azure.Security.IaaSAntimalware", + "status": { + "code": "ProvisioningState/succeeded", + "displayStatus": "Ready", + "level": "Info" + }, + "typeHandlerVersion": "1.5.5.9" + } + ], + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Ready", + "level": "Info", + "message": "GuestAgent is running and accepting new configurations.", + "time": "2019-10-14T23:11:22+00:00" + } + ], + "vmAgentVersion": "2.7.41491.949" + }, + "extensions": [ + { + "name": "IaaSAntiMalware-ext0", + "type": "Microsoft.Azure.Security.IaaSAntimalware", + "statuses": [ + { + "code": "ProvisioningState/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "Microsoft Antimalware enabled" + } + ], + "typeHandlerVersion": "1.5.5.9" + } + ] + } + } + }, + "operationId": "VirtualMachines_InstanceView", + "title": "Get Virtual Machine Instance View." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json new file mode 100644 index 0000000000..cb05bab257 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMaximumSetGen.json @@ -0,0 +1,695 @@ +{ + "parameters": { + "$filter": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "statusOnly": "aaaaaa", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "a", + "value": [ + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "licenseType": "aaaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa", + "domainNameLabelScope": "TenantReuse" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 8, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaa", + "exactVersion": "aaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.683Z", + "userData": "aaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "licenseType": "aaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa", + "domainNameLabelScope": "SubscriptionReuse" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 11, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exactVersion": "aa", + "id": "aaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.685Z", + "userData": "aaaaaaaaaaaaaaaaaaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachines_ListAll", + "title": "VirtualMachine_ListAll_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json new file mode 100644 index 0000000000..fe973cfdab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAll_VirtualMachineListAllMinimumSetGen.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + }, + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + } + ] + } + } + }, + "operationId": "VirtualMachines_ListAll", + "title": "VirtualMachine_ListAll_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json new file mode 100644 index 0000000000..dd9caf6226 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListAvailableSizes.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVmName" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Standard_A1_V2", + "maxDataDiskCount": 2, + "memoryInMB": 2048, + "numberOfCores": 1, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 10240 + }, + { + "name": "Standard_A2_V2", + "maxDataDiskCount": 4, + "memoryInMB": 4096, + "numberOfCores": 2, + "osDiskSizeInMB": 1047552, + "resourceDiskSizeInMB": 20480 + } + ] + } + } + }, + "operationId": "VirtualMachines_ListAvailableSizes", + "title": "Lists all available virtual machine sizes to which the specified virtual machine can be resized" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json new file mode 100644 index 0000000000..f57b47919a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_ListByLocation.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "location": "eastus", + "subscriptionId": "{subscriptionId}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hardwareProfile": { + "vmSize": "Standard_A0" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + } + } + }, + "vmId": "{vmId}" + }, + "tags": { + "RG": "rg", + "testTag": "1" + } + }, + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus", + "properties": { + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hardwareProfile": { + "vmSize": "Standard_A0" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}" + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Succeeded", + "storageProfile": { + "dataDisks": [], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "diskSizeGB": 127, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + } + } + }, + "vmId": "{vmId}" + }, + "tags": { + "RG": "rg", + "testTag": "1" + } + } + ] + } + } + }, + "operationId": "VirtualMachines_ListByLocation", + "title": "Lists all the virtual machines under the specified subscription for the specified location." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json new file mode 100644 index 0000000000..1c3ebb1dd7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMaximumSetGen.json @@ -0,0 +1,932 @@ +{ + "parameters": { + "$filter": "aaaaaaaaaaaaaaaaaaaaaaa", + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "a", + "value": [ + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "licenseType": "aaaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 8, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaa", + "exactVersion": "aaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.683Z", + "userData": "aaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "substatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "typeHandlerVersion": "aaaaaa" + }, + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + { + "name": "{virtualMachineName}", + "type": "Microsoft.Compute/virtualMachines", + "extendedLocation": { + "name": "aaaa", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "identity": { + "type": "SystemAssigned", + "principalId": "aaaaaaaaaaaaaaaa", + "tenantId": "aaaaa", + "userAssignedIdentities": { + "key5688": { + "clientId": "aaaaaaaaaaa", + "principalId": "aaaaaaaaaaaaaaa" + } + } + }, + "location": "eastus", + "plan": { + "name": "aaaaaaaaaaaaaaaaaa", + "product": "aaaaaaaaaaaaaaaaaaaaaa", + "promotionCode": "aaaaaaaaaaaaaa", + "publisher": "aaaaaaaaaaaaaaaaa" + }, + "properties": { + "additionalCapabilities": { + "hibernationEnabled": true, + "ultraSSDEnabled": true + }, + "applicationProfile": { + "galleryApplications": [ + { + "configurationReference": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "order": 4, + "packageReferenceId": "aaaaaaaaaaaaaaaaaaaaaa", + "tags": "aaaaa" + } + ] + }, + "availabilitySet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "billingProfile": { + "maxPrice": 26 + }, + "capacityReservation": { + "capacityReservationGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true, + "storageUri": "aaaaaaaaaaaaaaaaaaaaa" + } + }, + "evictionPolicy": "Deallocate", + "extensionsTimeBudget": "aaaaaaaaaaaaaaaaaaaaaa", + "hardwareProfile": { + "vmSize": "Standard_A0", + "vmSizeProperties": { + "vCPUsAvailable": 7, + "vCPUsPerCore": 14 + } + }, + "host": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "hostGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "instanceView": { + "assignedHost": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "bootDiagnostics": { + "consoleScreenshotBlobUri": "aaaaaaaaaaaaaaaaaaaaaaa", + "serialConsoleLogBlobUri": "aaaaaaaaaaaaaaaaaaa", + "status": { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + }, + "computerName": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "disks": [ + { + "name": "a", + "encryptionSettings": [ + { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ] + } + ], + "hyperVGeneration": "V1", + "maintenanceRedeployStatus": { + "isCustomerInitiatedMaintenanceAllowed": true, + "lastOperationMessage": "aa", + "lastOperationResultCode": "None", + "maintenanceWindowEndTime": "2022-01-14T16:43:41.682Z", + "maintenanceWindowStartTime": "2022-01-14T16:43:41.682Z", + "preMaintenanceWindowEndTime": "2022-01-14T16:43:41.682Z", + "preMaintenanceWindowStartTime": "2022-01-14T16:43:41.682Z" + }, + "osName": "aaaaaaaaaaa", + "osVersion": "aaaaaaaaaaaaaa", + "patchStatus": { + "availablePatchSummary": { + "assessmentActivityId": "aaaaaaaaaaaaaaaaaaa", + "criticalAndSecurityPatchCount": 22, + "error": { + "code": "aaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaa", + "target": "aaaaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaa", + "message": "aaaaaaaaaaaaa", + "target": "aaaaaa" + } + ] + }, + "lastModifiedTime": "2022-01-14T16:43:41.683Z", + "otherPatchCount": 25, + "rebootPending": true, + "startTime": "2022-01-14T16:43:41.682Z", + "status": "Unknown" + }, + "configurationStatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "lastPatchInstallationSummary": { + "error": { + "code": "aaaaaa", + "innererror": { + "errordetail": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exceptiontype": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "message": "aaa", + "target": "aaaaaaaaa", + "details": [ + { + "code": "aaaaaaaaaaaaaaaaaaaaa", + "message": "aaaaaaaaaaaaa", + "target": "aaaaaa" + } + ] + }, + "excludedPatchCount": 1, + "failedPatchCount": 30, + "installationActivityId": "aaaaaa", + "installedPatchCount": 28, + "lastModifiedTime": "2022-01-14T16:43:41.683Z", + "maintenanceWindowExceeded": true, + "notSelectedPatchCount": 20, + "pendingPatchCount": 2, + "startTime": "2022-01-14T16:43:41.683Z", + "status": "Unknown" + } + }, + "platformFaultDomain": 29, + "platformUpdateDomain": 1, + "rdpThumbPrint": "aaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "vmAgent": { + "extensionHandlers": [ + { + "type": "aaaaa", + "status": { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + }, + "typeHandlerVersion": "aaaaaaaaaaaaaaaaaaa" + } + ], + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "vmAgentVersion": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "vmHealth": { + "status": { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + }, + "extensions": [ + { + "name": "aaaaaaaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "substatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "typeHandlerVersion": "aaaaaa" + } + ] + }, + "licenseType": "aaaaaaaaaaaaaa", + "networkProfile": { + "networkApiVersion": "2022-05-01", + "networkInterfaceConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "deleteOption": "Delete", + "disableTcpStateTracking": true, + "dnsSettings": { + "dnsServers": [ + "aaaaaaaaaaaaaaaaaaaaaaaa" + ] + }, + "dscpConfiguration": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "enableAcceleratedNetworking": true, + "enableFpga": true, + "enableIPForwarding": true, + "ipConfigurations": [ + { + "name": "aaaaaaaa", + "properties": { + "applicationGatewayBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "applicationSecurityGroups": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "loadBalancerBackendAddressPools": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + ], + "primary": true, + "privateIPAddressVersion": "IPv4", + "publicIPAddressConfiguration": { + "name": "aaaaaaaaaaaaaaaaaa", + "properties": { + "deleteOption": "Delete", + "dnsSettings": { + "domainNameLabel": "aaaaa" + }, + "idleTimeoutInMinutes": 23, + "ipTags": [ + { + "ipTagType": "aaaaa", + "tag": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + } + ], + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Dynamic", + "publicIPPrefix": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "sku": { + "name": "Basic", + "tier": "Regional" + } + }, + "subnet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + } + ], + "networkSecurityGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "primary": true + } + } + ], + "networkInterfaces": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}", + "properties": { + "deleteOption": "Delete", + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "Foo12", + "allowExtensionOperations": true, + "computerName": "Test", + "customData": "aaaaaaaaaaaaaaaaaaaaaaa", + "linuxConfiguration": { + "disablePasswordAuthentication": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "patchMode": "ImageDefault" + }, + "provisionVMAgent": true, + "ssh": { + "publicKeys": [ + { + "path": "aaaaaaaaaaaaaaaaaaaaaa", + "keyData": "aaa" + } + ] + } + }, + "requireGuestProvisionSignal": true, + "secrets": [], + "windowsConfiguration": { + "additionalUnattendContent": [ + { + "componentName": "Microsoft-Windows-Shell-Setup", + "content": "aaaaaaaaaaaaaaaaaaaaaaaaaa", + "passName": "OobeSystem", + "settingName": "AutoLogon" + } + ], + "enableAutomaticUpdates": true, + "patchSettings": { + "assessmentMode": "ImageDefault", + "enableHotpatching": true, + "patchMode": "Manual" + }, + "provisionVMAgent": true, + "timeZone": "aaaaaaaaaaaaaaaaaaaa", + "winRM": { + "listeners": [ + { + "certificateUrl": "aaaaaaaaaaaaaaaaaaaaa", + "protocol": "Http" + } + ] + } + } + }, + "platformFaultDomain": 11, + "priority": "Regular", + "provisioningState": "Succeeded", + "proximityPlacementGroup": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "scheduledEventsProfile": { + "osImageNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT15M" + }, + "terminateNotificationProfile": { + "enable": true, + "notBeforeTimeout": "PT10M" + } + }, + "securityProfile": { + "encryptionAtHost": true, + "securityType": "TrustedLaunch", + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + } + }, + "storageProfile": { + "dataDisks": [], + "imageReference": { + "communityGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "exactVersion": "aa", + "id": "aaaaaaaa", + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sharedGalleryImageId": "aaaaaaaaaaaaaaaaaaaaaaaaa", + "sku": "2012-R2-Datacenter", + "version": "4.127.20170406" + }, + "osDisk": { + "name": "test", + "caching": "None", + "createOption": "FromImage", + "deleteOption": "Delete", + "diffDiskSettings": { + "option": "Local", + "placement": "CacheDisk" + }, + "diskSizeGB": 127, + "encryptionSettings": { + "diskEncryptionKey": { + "secretUrl": "aaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + }, + "enabled": true, + "keyEncryptionKey": { + "keyUrl": "aaaaaaaaaaaaa", + "sourceVault": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + } + } + }, + "image": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "managedDisk": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/disks/testingexcludedisk_OsDisk_1_74cdaedcea50483d9833c96adefa100f", + "securityProfile": { + "diskEncryptionSet": { + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "securityEncryptionType": "VMGuestStateOnly" + }, + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows", + "vhd": { + "uri": "https://{storageAccountName}.blob.core.windows.net/{containerName}/{vhdName}.vhd" + }, + "writeAcceleratorEnabled": true + } + }, + "timeCreated": "2022-01-14T16:43:41.685Z", + "userData": "aaaaaaaaaaaaaaaaaaa", + "virtualMachineScaleSet": { + "id": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}" + }, + "vmId": "{vmId}" + }, + "resources": [ + { + "name": "aaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaaaaa", + "id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "location": "aaaaaaaaaaaaaaaa", + "properties": { + "type": "aaaaaaaa", + "autoUpgradeMinorVersion": true, + "enableAutomaticUpgrade": true, + "forceUpdateTag": "aaaaaaaaaaaaaaa", + "instanceView": { + "name": "aaaaaaaaaaaaaaaaaaaaaaaa", + "type": "aaaaaaaaaaaaaaaaaaaaaaaa", + "statuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "substatuses": [ + { + "code": "aaa", + "displayStatus": "aaaaaaaaaaaaaaaaaaaaaaaa", + "level": "Info", + "message": "aaaaaaaaaaaaaaaaaaa", + "time": "2022-01-14T16:43:41.657Z" + } + ], + "typeHandlerVersion": "aaaaaa" + }, + "protectedSettings": {}, + "protectedSettingsFromKeyVault": { + "secretUrl": "https://kvName.vault.azure.net/secrets/secretName/79b88b3a6f5440ffb2e73e44a0db712e", + "sourceVault": { + "id": "/subscriptions/a53f7094-a16c-47af-abe4-b05c05d0d79a/resourceGroups/myResourceGroup/providers/Microsoft.KeyVault/vaults/kvName" + } + }, + "provisioningState": "aaa", + "publisher": "aaaaaaaaaaaaaaaa", + "settings": {}, + "suppressFailures": true, + "typeHandlerVersion": "aaaaaaaaaaaa" + }, + "tags": { + "key9428": "aaaaaaa" + } + } + ], + "tags": {}, + "zones": [ + "aaaaaa" + ] + } + ] + } + } + }, + "operationId": "VirtualMachines_List", + "title": "VirtualMachine_List_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json new file mode 100644 index 0000000000..2d08e37963 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_List_VirtualMachineListMinimumSetGen.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + }, + { + "id": "/subscriptions/{subscriptionId}/resourceGroups/rgcompute/providers/Microsoft.Compute/virtualMachines/{virtualMachineName}", + "location": "eastus" + } + ] + } + } + }, + "operationId": "VirtualMachines_List", + "title": "VirtualMachine_List_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json new file mode 100644 index 0000000000..9eec71dc7e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PerformMaintenance", + "title": "VirtualMachine_PerformMaintenance_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json new file mode 100644 index 0000000000..935617bd31 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PerformMaintenance_VirtualMachinePerformMaintenanceMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PerformMaintenance", + "title": "VirtualMachine_PerformMaintenance_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json new file mode 100644 index 0000000000..99bf340edf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "skipShutdown": true, + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PowerOff", + "title": "VirtualMachine_PowerOff_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json new file mode 100644 index 0000000000..fdab18ec3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_PowerOff_VirtualMachinePowerOffMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_PowerOff", + "title": "VirtualMachine_PowerOff_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json new file mode 100644 index 0000000000..d01b28ba63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reapply.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "ResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "VMName" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_Reapply", + "title": "Reapply the state of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json new file mode 100644 index 0000000000..abca78078a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "a" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Redeploy", + "title": "VirtualMachine_Redeploy_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json new file mode 100644 index 0000000000..505219bf6e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Redeploy_VirtualMachineRedeployMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Redeploy", + "title": "VirtualMachine_Redeploy_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json new file mode 100644 index 0000000000..d86353b888 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageANonEphemeralVirtualMachine.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "exactVersion": "aaaaaa", + "osProfile": { + "adminPassword": "{your-password}", + "customData": "{your-custom-data}" + }, + "tempDisk": true + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_Reimage", + "title": "Reimage a Non-Ephemeral Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json new file mode 100644 index 0000000000..532b20062d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Reimage_ReimageAVirtualMachine.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "tempDisk": true + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVMName" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_Reimage", + "title": "Reimage a Virtual Machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json new file mode 100644 index 0000000000..b1c5e31a21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Restart", + "title": "VirtualMachine_Restart_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json new file mode 100644 index 0000000000..c081f0098a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Restart_VirtualMachineRestartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Restart", + "title": "VirtualMachine_Restart_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json new file mode 100644 index 0000000000..0d374784df --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RetrieveBootDiagnosticsData.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "ResourceGroup", + "sasUriExpirationTimeInMinutes": 60, + "subscriptionId": "{subscription-id}", + "vmName": "VMName" + }, + "responses": { + "200": { + "body": { + "consoleScreenshotBlobUri": "https://storageuri/vm.screenshot.bmp?{sasKey}", + "serialConsoleLogBlobUri": "https://storageuri/vm.serialconsole.log?{sasKey}" + } + } + }, + "operationId": "VirtualMachines_RetrieveBootDiagnosticsData", + "title": "RetrieveBootDiagnosticsData of a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json new file mode 100644 index 0000000000..8fc3d9d1d4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_RunCommand.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "$top": 1, + "api-version": "2023-07-01", + "monitor": "true", + "parameters": { + "commandId": "RunPowerShellScript" + }, + "resourceGroupName": "crptestar98131", + "subscriptionId": "24fb23e3-6ba3-41f0-9b6e-e41131d5d61e", + "vmName": "vm3036" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "code": "ComponentStatus/StdOut/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "This is a sample script with parameters value1 value2" + }, + { + "code": "ComponentStatus/StdErr/succeeded", + "displayStatus": "Provisioning succeeded", + "level": "Info", + "message": "" + } + ] + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/westus/operations/{operationId}&monitor=true&api-version=2023-07-01" + } + } + }, + "operationId": "VirtualMachines_RunCommand", + "title": "VirtualMachineRunCommand" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json new file mode 100644 index 0000000000..3e1cac8ff2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_SimulateEviction.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "ResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "VMName" + }, + "responses": { + "204": {} + }, + "operationId": "VirtualMachines_SimulateEviction", + "title": "Simulate Eviction a virtual machine." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json new file mode 100644 index 0000000000..326389d619 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaaaaaaaaaaaaaaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Start", + "title": "VirtualMachine_Start_MaximumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json new file mode 100644 index 0000000000..a06f47c7db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Start_VirtualMachineStartMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "resourceGroupName": "rgcompute", + "subscriptionId": "{subscription-id}", + "vmName": "aaaaa" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "location": "https://foo.com/operationstatus" + } + } + }, + "operationId": "VirtualMachines_Start", + "title": "VirtualMachine_Start_MinimumSet_Gen" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json new file mode 100644 index 0000000000..41cfaf6144 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByDetachingDataDisk.json @@ -0,0 +1,137 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "toBeDetached": true + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + } + }, + "operationId": "VirtualMachines_Update", + "title": "Update a VM by detaching data disk" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json new file mode 100644 index 0000000000..944c91870e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/examples/2023-07-01/VirtualMachines_Update_UpdateAVmByForceDetachingDataDisk.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2023-07-01", + "parameters": { + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/{existing-nic-name}", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminPassword": "{your-password}", + "adminUsername": "{your-username}", + "computerName": "myVM" + }, + "storageProfile": { + "dataDisks": [ + { + "createOption": "Empty", + "detachOption": "ForceDetach", + "diskSizeGB": 1023, + "lun": 0, + "toBeDetached": true + }, + { + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + } + } + } + } + }, + "resourceGroupName": "myResourceGroup", + "subscriptionId": "{subscription-id}", + "vmName": "myVM" + }, + "responses": { + "200": { + "body": { + "name": "myVM", + "type": "Microsoft.Compute/virtualMachines", + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM", + "location": "westus", + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2_v2" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/networkInterfaces/nsgExistingNic", + "properties": { + "primary": true + } + } + ] + }, + "osProfile": { + "adminUsername": "{your-username}", + "computerName": "myVM", + "secrets": [], + "windowsConfiguration": { + "enableAutomaticUpdates": true, + "provisionVMAgent": true + } + }, + "provisioningState": "Updating", + "storageProfile": { + "dataDisks": [ + { + "caching": "None", + "createOption": "Empty", + "detachOption": "ForceDetach", + "diskSizeGB": 1023, + "lun": 0, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": true + }, + { + "caching": "None", + "createOption": "Empty", + "diskSizeGB": 1023, + "lun": 1, + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "toBeDetached": false + } + ], + "imageReference": { + "offer": "WindowsServer", + "publisher": "MicrosoftWindowsServer", + "sku": "2016-Datacenter", + "version": "latest" + }, + "osDisk": { + "name": "myVMosdisk", + "caching": "ReadWrite", + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "Standard_LRS" + }, + "osType": "Windows" + } + }, + "vmId": "3906fef9-a1e5-4b83-a8a8-540858b41df0" + } + } + } + }, + "operationId": "VirtualMachines_Update", + "title": "Update a VM by force-detaching data disk" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp index 819a8263c1..1654d879bc 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/main.tsp @@ -57,5 +57,34 @@ using TypeSpec.Versioning; @service({ title: "Azure Compute resource management API.", }) +@versioned(Versions) @doc("Compute Client") namespace Microsoft.Compute; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-07-01 API version.") + v2023_07_01: "2023-07-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-04-02 API version.") + v2023_04_02: "2023-04-02", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2021-07-01 API version.") + v2021_07_01: "2021-07-01", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-03-03 API version.") + v2022_03_03: "2022-03-03", + + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-09-04 API version.") + v2022_09_04: "2022-09-04", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp index dddd2316ac..ae375f90a9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/models.tsp @@ -7,28 +7,33 @@ using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.Compute; interface Operations extends Azure.ResourceManager.Operations {} +@doc("Type of repair action (replace, restart, reimage) that will be used for repairing unhealthy virtual machines in the scale set. Default value is replace.") enum RepairAction { Replace, Restart, Reimage, } +@doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**Manual** - You control the application of patches to a virtual machine. You do this by applying patches manually inside the VM. In this mode, automatic updates are disabled; the property WindowsConfiguration.enableAutomaticUpdates must be false

**AutomaticByOS** - The virtual machine will automatically be updated by the OS. The property WindowsConfiguration.enableAutomaticUpdates must be true.

**AutomaticByPlatform** - the virtual machine will automatically updated by the platform. The properties provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates must be true ") enum WindowsVMGuestPatchMode { Manual, AutomaticByOS, AutomaticByPlatform, } +@doc("Specifies the mode of VM Guest patch assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true. ") enum WindowsPatchAssessmentMode { ImageDefault, AutomaticByPlatform, } +@doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { Unknown, IfRequired, @@ -36,16 +41,19 @@ enum WindowsVMGuestPatchAutomaticByPlatformRebootSetting { Always, } +@doc("Specifies the mode of VM Guest Patching to IaaS virtual machine or virtual machines associated to virtual machine scale set with OrchestrationMode as Flexible.

Possible values are:

**ImageDefault** - The virtual machine's default patching configuration is used.

**AutomaticByPlatform** - The virtual machine will be automatically updated by the platform. The property provisionVMAgent must be true") enum LinuxVMGuestPatchMode { ImageDefault, AutomaticByPlatform, } +@doc("Specifies the mode of VM Guest Patch Assessment for the IaaS virtual machine.

Possible values are:

**ImageDefault** - You control the timing of patch assessments on a virtual machine.

**AutomaticByPlatform** - The platform will trigger periodic patch assessments. The property provisionVMAgent must be true.") enum LinuxPatchAssessmentMode { ImageDefault, AutomaticByPlatform, } +@doc("Specifies the reboot setting for all AutomaticByPlatform patch installation operations.") enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { Unknown, IfRequired, @@ -53,21 +61,25 @@ enum LinuxVMGuestPatchAutomaticByPlatformRebootSetting { Always, } +@doc("Specifies how the virtual machine should be created. Possible values are: **Attach.** This value is used when you are using a specialized disk to create the virtual machine. **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.") enum DiskCreateOptionTypes { FromImage, Empty, Attach, } +@doc("Specifies the ephemeral disk option for operating system disk.") enum DiffDiskOptions { Local, } +@doc("Specifies the ephemeral disk placement for operating system disk. This property can be used by user in the request to choose the location i.e, cache disk or resource disk space for Ephemeral OS disk provisioning. For more information on Ephemeral OS disk size requirements, please refer Ephemeral OS disk size requirements for Windows VM at https://docs.microsoft.com/azure/virtual-machines/windows/ephemeral-os-disks#size-requirements and Linux VM at https://docs.microsoft.com/azure/virtual-machines/linux/ephemeral-os-disks#size-requirements") enum DiffDiskPlacement { CacheDisk, ResourceDisk, } +@doc("Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types") enum StorageAccountTypes { Standard_LRS, Premium_LRS, @@ -78,16 +90,19 @@ enum StorageAccountTypes { PremiumV2_LRS, } +@doc("Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob, and VMGuestStateOnly for encryption of just the VMGuestState blob. **Note:** It can be set for only Confidential VMs.") enum SecurityEncryptionTypes { VMGuestStateOnly, DiskWithVMGuestState, } +@doc("Specifies the behavior of the managed disk when the VM gets deleted, for example whether the managed disk is deleted or detached. Supported values are: **Delete.** If this value is used, the managed disk is deleted when VM gets deleted. **Detach.** If this value is used, the managed disk is retained after VM gets deleted. Minimum api-version: 2021-03-01.") enum DiskDeleteOptionTypes { Delete, Detach, } +@doc("The Domain name label scope.The concatenation of the hashed domain name label that generated according to the policy from domain name label scope and vm index will be the domain name labels of the PublicIPAddress resources that will be created") enum DomainNameLabelScopeTypes { TenantReuse, SubscriptionReuse, @@ -95,32 +110,38 @@ enum DomainNameLabelScopeTypes { NoReuse, } +@doc("Available from Api-Version 2017-03-30 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") enum IPVersion { IPv4, IPv6, } +@doc("Specify what happens to the network interface when the VM is deleted") enum DeleteOptions { Delete, Detach, } +@doc("Specify public IP sku name") enum PublicIPAddressSkuName { Basic, Standard, } +@doc("Specify public IP sku tier") enum PublicIPAddressSkuTier { Regional, Global, } +@doc("Specifies whether the Auxiliary mode is enabled for the Network Interface resource.") enum NetworkInterfaceAuxiliaryMode { None, AcceleratedConnections, Floating, } +@doc("Specifies whether the Auxiliary sku is enabled for the Network Interface resource.") enum NetworkInterfaceAuxiliarySku { None, A1, @@ -129,21 +150,25 @@ enum NetworkInterfaceAuxiliarySku { A8, } +@doc("specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations") enum NetworkApiVersion { `2020-11-01`, } +@doc("Specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UefiSettings. The default behavior is: UefiSettings will not be enabled unless this property is set.") enum SecurityTypes { TrustedLaunch, ConfidentialVM, } +@doc("Specifies the priority for a standalone virtual machine or the virtual machines in the scale set. 'Low' enum will be deprecated in the future, please use 'Spot' as the enum to deploy Azure Spot VM/VMSS.") enum VirtualMachinePriorityTypes { Regular, Low, Spot, } +@doc("Specifies the eviction policy for the Azure Spot VM/VMSS") enum VirtualMachineEvictionPolicyTypes { Deallocate, Delete, @@ -155,11 +180,13 @@ enum VirtualMachineScaleSetScaleInRules { NewestVM, } +@doc("Specifies the orchestration mode for the virtual machine scale set.") enum OrchestrationMode { Uniform, Flexible, } +@doc("The type of extendedLocation.") enum ExtendedLocationTypes { EdgeZone, } @@ -168,26 +195,31 @@ enum ExpandTypesForGetVMScaleSets { userData, } +@doc("The name of the service.") enum OrchestrationServiceNames { AutomaticRepairs, } +@doc("The current state of the service.") enum OrchestrationServiceState { NotRunning, Running, Suspended, } +@doc("The action to be performed.") enum OrchestrationServiceStateAction { Resume, Suspend, } +@doc("The hypervisor generation of the Virtual Machine. Applicable to OS disks only.") enum HyperVGeneration { V1, V2, } +@doc("Specifies the size of the virtual machine. The enum data type is currently deprecated and will be removed by December 23rd 2023. The recommended way to get the list of available sizes is using these APIs: [List all available virtual machine sizes in an availability set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes), [List all available virtual machine sizes in a region]( https://docs.microsoft.com/rest/api/compute/resourceskus/list), [List all available virtual machine sizes for resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). For more information about virtual machine sizes, see [Sizes for virtual machines](https://docs.microsoft.com/azure/virtual-machines/sizes). The available VM sizes depend on region and availability set.") enum VirtualMachineSizeTypes { Basic_A0, Basic_A1, @@ -357,30 +389,36 @@ enum VirtualMachineSizeTypes { Standard_NV24, } +@doc("Specifies the detach behavior to be used while detaching a disk or which is already in the process of detachment from the virtual machine. Supported values are: **ForceDetach.** detachOption: **ForceDetach** is applicable only for managed data disks. If a previous detachment attempt of the data disk did not complete due to an unexpected failure from the virtual machine and the disk is still not released then use force-detach as a last resort option to detach the disk forcibly from the VM. All writes might not have been flushed when using this detach behavior. **This feature is still in preview** mode and is not supported for VirtualMachineScaleSet. To force-detach a data disk update toBeDetached to 'true' along with setting detachOption: 'ForceDetach'.") enum DiskDetachOptionTypes { ForceDetach, } +@doc("Specifies the disk controller type configured for the VM and VirtualMachineScaleSet. This property is only supported for virtual machines whose operating system disk and VM sku supports Generation 2 (https://docs.microsoft.com/en-us/azure/virtual-machines/generation-2), please check the HyperVGenerations capability returned as part of VM sku capabilities in the response of Microsoft.Compute SKUs api for the region contains V2 (https://docs.microsoft.com/rest/api/compute/resourceskus/list). For more information about Disk Controller Types supported please refer to https://aka.ms/azure-diskcontrollertypes.") enum DiskControllerTypes { SCSI, NVMe, } +@doc("Available from Api-Version 2019-07-01 onwards, it represents whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and 'IPv6'.") enum IPVersions { IPv4, IPv6, } +@doc("Specify the public IP allocation type") enum PublicIPAllocationMethod { Dynamic, Static, } +@doc("Specifies the HyperVGeneration Type associated with a resource") enum HyperVGenerationType { V1, V2, } +@doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") enum PatchOperationStatus { Unknown, InProgress, @@ -397,6 +435,7 @@ enum ExpandTypesForListVMs { instanceView, } +@doc("Describes the reboot requirements of the patch.") enum VMGuestPatchRebootBehavior { Unknown, NeverReboots, @@ -404,11 +443,13 @@ enum VMGuestPatchRebootBehavior { CanRequestReboot, } +@doc("Describes the availability of a given patch.") enum PatchAssessmentState { Unknown, Available, } +@doc("Defines when it is acceptable to reboot a VM during a software update operation.") enum VMGuestPatchRebootSetting { IfRequired, Never, @@ -432,6 +473,7 @@ enum VMGuestPatchClassificationLinux { Other, } +@doc("The reboot state of the VM following completion of the operation.") enum VMGuestPatchRebootStatus { Unknown, NotNeeded, @@ -441,6 +483,7 @@ enum VMGuestPatchRebootStatus { Completed, } +@doc("The state of the patch after the installation operation completed.") enum PatchInstallationState { Unknown, Installed, @@ -450,43 +493,51 @@ enum PatchInstallationState { Pending, } +@doc("Specifies the HyperVGeneration Type") enum HyperVGenerationTypes { V1, V2, } +@doc("VM disk types which are disallowed.") enum VmDiskTypes { None, Unmanaged, } +@doc("Specifies the Architecture Type") enum ArchitectureTypes { x64, Arm64, } +@doc("Describes the state of the image.") enum ImageState { Active, ScheduledForDeprecation, Deprecated, } +@doc("Describes the type of the alternative option.") enum AlternativeType { None, Offer, Plan, } +@doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") enum ProximityPlacementGroupType { Standard, Ultra, } +@doc("Gets the Operating System type.") enum OperatingSystemType { Windows, Linux, } +@doc("The type of key used to encrypt the data of the disk restore point.") enum RestorePointEncryptionType { @doc("Disk Restore Point is encrypted at rest with Platform managed key. ") EncryptionAtRestWithPlatformKey, @@ -496,6 +547,7 @@ enum RestorePointEncryptionType { EncryptionAtRestWithPlatformAndCustomerKeys, } +@doc("ConsistencyMode of the RestorePoint. Can be specified in the input while creating a restore point. For now, only CrashConsistent is accepted as a valid input. Please refer to https://aka.ms/RestorePoints for more details.") enum ConsistencyModeTypes { CrashConsistent, FileSystemConsistent, @@ -523,6 +575,7 @@ enum CapacityReservationInstanceViewTypes { instanceView, } +@doc("Script execution status.") enum ExecutionState { Unknown, Pending, @@ -533,6 +586,7 @@ enum ExecutionState { Canceled, } +@doc("The sku name.") enum DiskStorageAccountTypes { @doc("Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access.") Standard_LRS, @@ -550,11 +604,13 @@ enum DiskStorageAccountTypes { PremiumV2_LRS, } +@doc("The architecture of the image. Applicable to OS disks only.") enum Architecture { x64, Arm64, } +@doc("This enumerates the possible sources of a disk's creation.") enum DiskCreateOption { @doc("Create an empty data disk of a size given by diskSizeGB.") Empty, @doc("Disk will be attached to a VM.") Attach, @@ -577,6 +633,7 @@ enum DiskCreateOption { CopyFromSanSnapshot, } +@doc("This enumerates the possible state of the disk.") enum DiskState { @doc("The disk is not being used and can be attached to a VM.") Unattached, @doc("The disk is currently attached to a running VM.") Attached, @@ -592,6 +649,7 @@ enum DiskState { ActiveUpload, } +@doc("The type of key used to encrypt the data of the disk.") enum EncryptionType { @doc("Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is not a valid encryption type for disk encryption sets.") EncryptionAtRestWithPlatformKey, @@ -601,6 +659,7 @@ enum EncryptionType { EncryptionAtRestWithPlatformAndCustomerKeys, } +@doc("Policy for accessing the disk via network.") enum NetworkAccessPolicy { @doc("The disk can be exported or uploaded to from any network.") AllowAll, @doc("The disk can be exported or uploaded to using a DiskAccess resource's private endpoints.") @@ -608,6 +667,7 @@ enum NetworkAccessPolicy { @doc("The disk cannot be exported.") DenyAll, } +@doc("Specifies the SecurityType of the VM. Applicable for OS disks only.") enum DiskSecurityTypes { @doc("Trusted Launch provides security features such as secure boot and virtual Trusted Platform Module (vTPM)") TrustedLaunch, @@ -619,6 +679,7 @@ enum DiskSecurityTypes { ConfidentialVM_DiskEncryptedWithCustomerKey, } +@doc("Policy for controlling export on the disk.") enum PublicNetworkAccess { @doc("You can generate a SAS URI to access the underlying data of the disk publicly on the internet when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate.") Enabled, @@ -626,6 +687,7 @@ enum PublicNetworkAccess { Disabled, } +@doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") enum DataAccessAuthMode { @doc("When export/upload URL is used, the system checks if the user has an identity in Azure Active Directory and has necessary permissions to export/upload the data. Please refer to aka.ms/DisksAzureADAuth.") AzureActiveDirectory, @@ -633,12 +695,14 @@ enum DataAccessAuthMode { None, } +@doc("The Access Level, accepted values include None, Read, Write.") enum AccessLevel { None, Read, Write, } +@doc("Used to specify the file format when making request for SAS on a VHDX file format snapshot") enum FileFormat { @doc("A VHD file is a disk image file in the Virtual Hard Disk file format.") VHD, @@ -646,12 +710,14 @@ enum FileFormat { VHDX, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -659,6 +725,7 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported for new creations. Disk Encryption Sets can be updated with Identity type None during migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources to lose access to the keys.") enum DiskEncryptionSetIdentityType { SystemAssigned, UserAssigned, @@ -666,6 +733,7 @@ enum DiskEncryptionSetIdentityType { None, } +@doc("The type of key used to encrypt the data of the disk.") enum DiskEncryptionSetType { @doc("Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can be changed and revoked by a customer.") EncryptionAtRestWithCustomerKey, @@ -675,21 +743,25 @@ enum DiskEncryptionSetType { ConfidentialVmEncryptedWithCustomerKey, } +@doc("The sku name.") enum SnapshotStorageAccountTypes { @doc("Standard HDD locally redundant storage") Standard_LRS, @doc("Premium SSD locally redundant storage") Premium_LRS, @doc("Standard zone redundant storage") Standard_ZRS, } +@doc("Indicates the error code if the background copy of a resource created via the CopyStart operation fails.") enum CopyCompletionErrorReason { @doc("Indicates that the source snapshot was deleted while the background copy of the resource created via CopyStart operation was in progress.") CopySourceNotFound, } +@doc("The type of the extended location.") enum ExtendedLocationType { EdgeZone, } +@doc("The provisioning state, which only appears in the response.") enum GalleryProvisioningState { Creating, Updating, @@ -699,17 +771,20 @@ enum GalleryProvisioningState { Migrating, } +@doc("This property allows you to specify the permission of sharing gallery.

Possible values are:

**Private**

**Groups**

**Community**") enum GallerySharingPermissionTypes { Private, Groups, Community, } +@doc("This property allows you to specify the type of sharing group.

Possible values are:

**Subscriptions**

**AADTenants**") enum SharingProfileGroupTypes { Subscriptions, AADTenants, } +@doc("The sharing state of the gallery, which only appears in the response.") enum SharingState { Succeeded, InProgress, @@ -725,28 +800,33 @@ enum GalleryExpandParams { `SharingProfile/Groups`, } +@doc("Specifies the storage account type to be used to store the image. This property is not updatable.") enum StorageAccountType { Standard_LRS, Standard_ZRS, Premium_LRS, } +@doc("confidential VM encryption types") enum ConfidentialVMEncryptionType { EncryptedVMGuestStateOnlyWithPmk, EncryptedWithPmk, EncryptedWithCmk, } +@doc("Optional parameter which specifies the mode to be used for replication. This property is not updatable.") enum ReplicationMode { Full, Shallow, } +@doc("It is type of the extended location.") enum GalleryExtendedLocationType { EdgeZone, Unknown, } +@doc("Specifies the storage account type to be used to store the image. This property is not updatable.") enum EdgeZoneStorageAccountType { Standard_LRS, Standard_ZRS, @@ -754,6 +834,7 @@ enum EdgeZoneStorageAccountType { Premium_LRS, } +@doc("Describes the nature of the policy violation.") enum PolicyViolationCategory { Other, ImageFlaggedUnsafe, @@ -761,6 +842,7 @@ enum PolicyViolationCategory { IpTheft, } +@doc("This is the aggregated replication status based on all the regional replication status flags.") enum AggregatedReplicationState { Unknown, InProgress, @@ -768,6 +850,7 @@ enum AggregatedReplicationState { Failed, } +@doc("This is the regional replication state.") enum ReplicationState { Unknown, Replicating, @@ -779,6 +862,7 @@ enum ReplicationStatusTypes { ReplicationStatus, } +@doc("This property allows you to specify the operation type of gallery sharing update.

Possible values are:

**Add**

**Remove**

**Reset**") enum SharingUpdateOperationTypes { Add, Remove, @@ -790,23 +874,35 @@ enum SharedToValues { tenant, } +@doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") enum SharedGalleryHostCaching { None, ReadOnly, ReadWrite, } +@doc(""" +Update mode for the cloud service. Role instances are allocated to update domains when the service is deployed. Updates can be initiated manually in each update domain or initiated automatically in all update domains. +Possible Values are

**Auto**

**Manual**

**Simultaneous**

+If not specified, the default value is Auto. If set to Manual, PUT UpdateDomain must be called to apply the update. If set to Auto, the update is automatically applied to each update domain in sequence. +""") enum CloudServiceUpgradeMode { Auto, Manual, Simultaneous, } +@doc(""" +Slot type for the cloud service. +Possible values are

**Production**

**Staging**

+If not specified, the default value is Production. +""") enum CloudServiceSlotType { Production, Staging, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -814,148 +910,183 @@ enum CreatedByType { Key, } +@doc("Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'.") enum AvailabilitySetSkuTypes { Classic, Aligned, } -@Azure.Core.fixed + +@doc("Specifies the mode of an upgrade to virtual machines in the scale set.

Possible values are:

**Manual** - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.

**Automatic** - All virtual machines in the scale set are automatically updated at the same time.") +@fixed enum UpgradeMode { Automatic, Manual, Rolling, } -@Azure.Core.fixed + +@doc("Specifies the name of the setting to which the content applies. Possible values are: FirstLogonCommands and AutoLogon.") +@fixed enum SettingNames { AutoLogon, FirstLogonCommands, } -@Azure.Core.fixed + +@doc("Specifies the protocol of WinRM listener. Possible values are: **http,** **https.**") +@fixed enum ProtocolTypes { Http, Https, } -@Azure.Core.fixed + +@doc("Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage**") +@fixed enum CachingTypes { None, ReadOnly, ReadWrite, } -@Azure.Core.fixed + +@doc("This property allows you to specify the supported type of the OS that application is built for.

Possible values are:

**Windows**

**Linux**") +@fixed enum OperatingSystemTypes { Windows, Linux, } -@Azure.Core.fixed + +@doc("The level code.") +@fixed enum StatusLevelTypes { Info, Warning, Error, } -@Azure.Core.fixed + +@doc("The type of identity used for the virtual machine scale set. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the virtual machine scale set.") +@fixed enum ResourceIdentityType { SystemAssigned, UserAssigned, `SystemAssigned, UserAssigned`, None, } -@Azure.Core.fixed + +@doc("The scale type applicable to the sku.") +@fixed enum VirtualMachineScaleSetSkuScaleType { Automatic, None, } -@Azure.Core.fixed + +@doc("Code indicating the current status of the upgrade.") +@fixed enum UpgradeState { RollingForward, Cancelled, Completed, Faulted, } -@Azure.Core.fixed + +@doc("Invoker of the Upgrade Operation") +@fixed enum UpgradeOperationInvoker { Unknown, User, Platform, } -@Azure.Core.fixed + +@doc("Code indicating the current status of the upgrade.") +@fixed enum RollingUpgradeStatusCode { RollingForward, Cancelled, Completed, Faulted, } -@Azure.Core.fixed + +@doc("The last action performed on the rolling upgrade.") +@fixed enum RollingUpgradeActionType { Start, Cancel, } -@Azure.Core.fixed + +@doc("The Last Maintenance Operation Result Code.") +@fixed enum MaintenanceOperationResultCodeTypes { None, RetryLater, MaintenanceAborted, MaintenanceCompleted, } -@Azure.Core.fixed + +@fixed enum InstanceViewTypes { instanceView, userData, } -@Azure.Core.fixed + +@doc("Specifies the software license type that will be applied to the VMs deployed on the dedicated host. Possible values are: **None,** **Windows_Server_Hybrid,** **Windows_Server_Perpetual.** The default value is: **None.**") +@fixed enum DedicatedHostLicenseTypes { None, Windows_Server_Hybrid, Windows_Server_Perpetual, } -@Azure.Core.fixed + +@doc("This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.") +@fixed enum OperatingSystemStateTypes { Generalized, Specialized, } -@Azure.Core.fixed + +@doc("Interval value in minutes used to create LogAnalytics call rate logs.") +@fixed enum IntervalInMins { ThreeMins, FiveMins, ThirtyMins, SixtyMins, } -@Azure.Core.fixed + +@doc("The scale type applicable to the sku.") +@fixed enum ResourceSkuCapacityScaleType { Automatic, Manual, None, } -@Azure.Core.fixed + +@doc("The type of restrictions.") +@fixed enum ResourceSkuRestrictionsType { Location, Zone, } -@Azure.Core.fixed + +@doc("The reason for restriction.") +@fixed enum ResourceSkuRestrictionsReasonCode { QuotaId, NotAvailableForSubscription, } -@Azure.Core.fixed + +@doc("The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'") +@fixed enum HostCaching { None, ReadOnly, ReadWrite, } -@Azure.Core.fixed + +@doc("Specifies the type of the custom action parameter. Possible values are: String, ConfigurationDataBlob or LogOutputBlob") +@fixed enum GalleryApplicationCustomActionParameterType { String, ConfigurationDataBlob, LogOutputBlob, } -@doc("The List Compute Operation operation response.") -@pagedResult -model ComputeOperationListResult { - @doc("The list of compute operations") - @visibility("read") - @items - value?: ComputeOperationValue[]; -} - @doc("Describes the properties of a Compute Operation value.") model ComputeOperationValue { @doc("The origin of the compute operation.") @@ -2169,6 +2300,78 @@ model ExtendedLocation { type?: ExtendedLocationTypes; } +@doc("The Resource model definition.") +model Resource { + @doc("Resource Id") + @visibility("read") + id?: string; + + @doc("Resource name") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Resource location") + location: string; + + @doc("Resource tags") + tags?: Record; +} + +@doc("Describes a Virtual Machine Scale Set.") +model VirtualMachineScaleSetUpdate extends UpdateResource { + @doc("The virtual machine scale set sku.") + sku?: Sku; + + @doc("The purchase plan when deploying a virtual machine scale set from VM Marketplace images.") + plan?: Plan; + + @doc("Describes the properties of a Virtual Machine Scale Set.") + properties?: VirtualMachineScaleSetUpdateProperties; + + @doc("The identity of the virtual machine scale set, if configured.") + identity?: VirtualMachineScaleSetIdentity; +} + +@doc("Describes the properties of a Virtual Machine Scale Set.") +model VirtualMachineScaleSetUpdateProperties { + @doc("The upgrade policy.") + upgradePolicy?: UpgradePolicy; + + @doc("Policy for automatic repairs.") + automaticRepairsPolicy?: AutomaticRepairsPolicy; + + @doc("The virtual machine profile.") + virtualMachineProfile?: VirtualMachineScaleSetUpdateVMProfile; + + @doc("Specifies whether the Virtual Machine Scale Set should be overprovisioned.") + overprovision?: boolean; + + @doc("When Overprovision is enabled, extensions are launched only on the requested number of VMs which are finally kept. This property will hence ensure that the extensions do not run on the extra overprovisioned VMs.") + doNotRunExtensionsOnOverprovisionedVMs?: boolean; + + @doc("When true this limits the scale set to a single placement group, of max size 100 virtual machines. NOTE: If singlePlacementGroup is true, it may be modified to false. However, if singlePlacementGroup is false, it may not be modified to true.") + singlePlacementGroup?: boolean; + + @doc("Specifies additional capabilities enabled or disabled on the Virtual Machines in the Virtual Machine Scale Set. For instance: whether the Virtual Machines have the capability to support attaching managed data disks with UltraSSD_LRS storage account type.") + additionalCapabilities?: AdditionalCapabilities; + + @doc("Specifies the policies applied when scaling in Virtual Machines in the Virtual Machine Scale Set.") + scaleInPolicy?: ScaleInPolicy; + + @doc("Specifies information about the proximity placement group that the virtual machine scale set should be assigned to.

Minimum api-version: 2018-04-01.") + proximityPlacementGroup?: SubResource; + + @doc("Specifies the desired targets for mixing Spot and Regular priority VMs within the same VMSS Flex instance.") + priorityMixPolicy?: PriorityMixPolicy; + + @doc("Specifies the Spot Restore properties for the virtual machine scale set.") + spotRestorePolicy?: SpotRestorePolicy; +} + @doc("Describes a virtual machine scale set virtual machine profile.") model VirtualMachineScaleSetUpdateVMProfile { @doc("The virtual machine scale set OS profile.") @@ -2451,6 +2654,20 @@ model OrchestrationServiceSummary { serviceState?: OrchestrationServiceState; } +@doc("Describes a Virtual Machine Scale Set Extension.") +model VirtualMachineScaleSetExtensionUpdate extends SubResourceReadOnly { + @doc("The name of the extension.") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Describes the properties of a Virtual Machine Scale Set Extension.") + properties?: VirtualMachineScaleSetExtensionProperties; +} + @doc("The Virtual Machine Scale Set List Skus operation response.") model VirtualMachineScaleSetListSkusResult is Azure.Core.Page; @@ -2683,6 +2900,53 @@ model OrchestrationServiceStateInput { action: OrchestrationServiceStateAction; } +@doc("Describes a VMSS VM Extension.") +model VirtualMachineScaleSetVMExtensionUpdate extends SubResourceReadOnly { + @doc("The name of the extension.") + @visibility("read") + name?: string; + + @doc("Resource type") + @visibility("read") + type?: string; + + @doc("Describes the properties of a Virtual Machine Extension.") + properties?: VirtualMachineExtensionUpdateProperties; +} + +@doc("Describes the properties of a Virtual Machine Extension.") +model VirtualMachineExtensionUpdateProperties { + @doc("How the extension handler should be forced to update even if the extension configuration has not changed.") + forceUpdateTag?: string; + + @doc("The name of the extension handler publisher.") + publisher?: string; + + @doc("Specifies the type of the extension; an example is \"CustomScriptExtension\".") + type?: string; + + @doc("Specifies the version of the script handler.") + typeHandlerVersion?: string; + + @doc("Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true.") + autoUpgradeMinorVersion?: boolean; + + @doc("Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available.") + enableAutomaticUpgrade?: boolean; + + @doc("Json formatted public settings for the extension.") + settings?: Record; + + @doc("The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all.") + protectedSettings?: Record; + + @doc("Indicates whether failures stemming from the extension will be suppressed (Operational failures such as not connecting to the VM will not be suppressed regardless of this value). The default is false.") + suppressFailures?: boolean; + + @doc("The extensions protected settings that are passed by reference, and consumed from key vault") + protectedSettingsFromKeyVault?: KeyVaultSecretReference; +} + @doc("Describes the properties of a virtual machine scale set virtual machine.") model VirtualMachineScaleSetVMProperties { @doc("Specifies whether the latest model has been applied to the virtual machine.") @@ -3270,6 +3534,12 @@ model RetrieveBootDiagnosticsDataResult { serialConsoleLogBlobUri?: string; } +@doc("Describes a Virtual Machine Extension.") +model VirtualMachineExtensionUpdate extends UpdateResource { + @doc("Describes the properties of a Virtual Machine Extension.") + properties?: VirtualMachineExtensionUpdateProperties; +} + @doc("Describes the properties of a Virtual Machine.") model VirtualMachineProperties { @doc("Specifies the hardware settings for the virtual machine.") @@ -3540,6 +3810,21 @@ model VirtualMachineCaptureResult extends SubResource { resources?: Record[]; } +@doc("Describes a Virtual Machine Update.") +model VirtualMachineUpdate extends UpdateResource { + @doc("Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.") + plan?: Plan; + + @doc("Describes the properties of a Virtual Machine.") + properties?: VirtualMachineProperties; + + @doc("The identity of the virtual machine, if configured.") + identity?: VirtualMachineIdentity; + + @doc("The virtual machine zones.") + zones?: string[]; +} + @doc("Describes the properties of an AssessPatches result.") model VirtualMachineAssessPatchesResult { @doc("The overall success or failure status of the operation. It remains \"InProgress\" until the operation completes. At that point it will become \"Unknown\", \"Failed\", \"Succeeded\", or \"CompletedWithWarnings.\"") @@ -3913,6 +4198,15 @@ model AvailabilitySetProperties { statuses?: InstanceViewStatus[]; } +@doc("Specifies information about the availability set that the virtual machine should be assigned to. Only tags may be updated.") +model AvailabilitySetUpdate extends UpdateResource { + @doc("The instance view of a resource.") + properties?: AvailabilitySetProperties; + + @doc("Sku of the availability set") + sku?: Sku; +} + @doc("Describes the properties of a Proximity Placement Group.") model ProximityPlacementGroupProperties { @doc("Specifies the type of the proximity placement group. Possible values are: **Standard** : Co-locate resources within an Azure region or Availability Zone. **Ultra** : For future use.") @@ -4018,6 +4312,15 @@ model DedicatedHostGroupPropertiesAdditionalCapabilities { ultraSSDEnabled?: boolean; } +@doc("Specifies information about the dedicated host group that the dedicated host should be assigned to. Only tags may be updated.") +model DedicatedHostGroupUpdate extends UpdateResource { + @doc("Dedicated Host Group Properties.") + properties?: DedicatedHostGroupProperties; + + @doc("Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone.") + zones?: string[]; +} + @doc("Properties of the dedicated host.") model DedicatedHostProperties { @doc("Fault domain of the dedicated host within a dedicated host group.") @@ -4056,6 +4359,15 @@ model DedicatedHostProperties { timeCreated?: utcDateTime; } +@doc("Specifies information about the dedicated host. Only tags, autoReplaceOnFailure and licenseType may be updated.") +model DedicatedHostUpdate extends UpdateResource { + @doc("Properties of the dedicated host.") + properties?: DedicatedHostProperties; + + @doc("[List all available dedicated host sizes for resizing] (https://docs.microsoft.com/rest/api/compute/dedicated-hosts/listavailablesizes). Resizing can be only used to scale up DedicatedHost. Only name is required to be set. ") + sku?: Sku; +} + @doc("The List Dedicated Host sizes operation response.") @pagedResult model DedicatedHostSizeListResult { @@ -4070,6 +4382,12 @@ model SshPublicKeyResourceProperties { publicKey?: string; } +@doc("Specifies information about the SSH public key.") +model SshPublicKeyUpdateResource extends UpdateResource { + @doc("Properties of the SSH public key.") + properties?: SshPublicKeyResourceProperties; +} + @doc("Response from generation of an SSH key pair.") model SshPublicKeyGenerateKeyPairResult { @doc("Private key portion of the key pair used to authenticate to a virtual machine through ssh. The private key is returned in RFC3447 format and should be treated as a secret.") @@ -4149,6 +4467,12 @@ model ImageDataDisk extends ImageDisk { lun: int32; } +@doc("The source user image virtual hard disk. Only tags may be updated.") +model ImageUpdate extends UpdateResource { + @doc("Describes the properties of an Image.") + properties?: ImageProperties; +} + @doc("The restore point collection properties.") model RestorePointCollectionProperties { @doc("The properties of the source resource that this restore point collection is created from.") @@ -4363,6 +4687,12 @@ model DiskRestorePointReplicationStatus { completionPercent?: int32; } +@doc("Update Restore Point collection parameters.") +model RestorePointCollectionUpdate extends UpdateResource { + @doc("The restore point collection properties.") + properties?: RestorePointCollectionProperties; +} + @doc("capacity reservation group Properties.") model CapacityReservationGroupProperties { @doc("A list of all capacity reservation resource ids that belong to capacity reservation group.") @@ -4412,6 +4742,12 @@ model CapacityReservationUtilization { virtualMachinesAllocated?: SubResourceReadOnly[]; } +@doc("Specifies information about the capacity reservation group. Only tags can be updated.") +model CapacityReservationGroupUpdate extends UpdateResource { + @doc("capacity reservation group Properties.") + properties?: CapacityReservationGroupProperties; +} + @doc("Properties of the Capacity reservation.") model CapacityReservationProperties { @doc("A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.") @@ -4445,6 +4781,15 @@ model CapacityReservationProperties { timeCreated?: utcDateTime; } +@doc("Specifies information about the capacity reservation. Only tags and sku.capacity can be updated.") +model CapacityReservationUpdate extends UpdateResource { + @doc("Properties of the Capacity reservation.") + properties?: CapacityReservationProperties; + + @doc("SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.") + sku?: Sku; +} + @doc("Api request input for LogAnalytics getRequestRateByInterval Api.") model RequestRateByIntervalInput extends LogAnalyticsInputBase { @doc("Interval value in minutes used to create LogAnalytics call rate logs.") @@ -4666,6 +5011,12 @@ model VirtualMachineRunCommandInstanceView { statuses?: InstanceViewStatus[]; } +@doc("Describes a Virtual Machine run command.") +model VirtualMachineRunCommandUpdate extends UpdateResource { + @doc("Describes the properties of a Virtual Machine run command.") + properties?: VirtualMachineRunCommandProperties; +} + @doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") model DiskSku { @doc("The sku name.") @@ -4947,6 +5298,84 @@ model DiskSecurityProfile { secureVMDiskEncryptionSetId?: string; } +@doc("Disk update resource.") +model DiskUpdate { + @doc("Disk resource update properties.") + properties?: DiskUpdateProperties; + + @doc("Resource tags") + tags?: Record; + + @doc("The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, StandardSSD_ZRS, or PremiumV2_LRS.") + sku?: DiskSku; +} + +@doc("Disk resource update properties.") +model DiskUpdateProperties { + @doc("the Operating System type.") + osType?: OperatingSystemTypes; + + @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + diskSizeGB?: int32; + + @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc("The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.") + @projectedName("json", "diskIOPSReadWrite") + diskIopsReadWrite?: int32; + + @doc("The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") + diskMBpsReadWrite?: int32; + + @doc("The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.") + @projectedName("json", "diskIOPSReadOnly") + diskIopsReadOnly?: int32; + + @doc("The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.") + diskMBpsReadOnly?: int32; + + @doc("The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time.") + maxShares?: int32; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Performance tier of the disk (e.g, P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.") + tier?: string; + + @doc("Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.") + burstingEnabled?: boolean; + + @doc("Purchase plan information to be added on the OS disk") + purchasePlan?: DiskPurchasePlan; + + @doc("List of supported capabilities to be added on the OS disk.") + supportedCapabilities?: SupportedCapabilities; + + @doc("Properties of the disk for which update is pending.") + @visibility("read") + propertyUpdatesInProgress?: PropertyUpdatesInProgress; + + @doc("Indicates the OS on a disk supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc("Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) by detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.") + optimizedForFrequentAttach?: boolean; +} + @doc("Data used for requesting a SAS.") model GrantAccessData { @doc("The Access Level, accepted values include None, Read, Write.") @@ -5021,6 +5450,12 @@ model PrivateLinkServiceConnectionState { actionsRequired?: string; } +@doc("Used for updating a disk access resource.") +model DiskAccessUpdate { + @doc("Resource tags") + tags?: Record; +} + @doc("A list of private link resources") model PrivateLinkResourceListResult { @doc("Array of private link resources") @@ -5116,6 +5551,33 @@ model KeyForDiskEncryptionSet { keyUrl: string; } +@doc("disk encryption set update resource.") +model DiskEncryptionSetUpdate { + @doc("disk encryption set resource update properties.") + properties?: DiskEncryptionSetUpdateProperties; + + @doc("Resource tags") + tags?: Record; + + @doc("The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks.") + identity?: EncryptionSetIdentity; +} + +@doc("disk encryption set resource update properties.") +model DiskEncryptionSetUpdateProperties { + @doc("The type of key used to encrypt the data of the disk.") + encryptionType?: DiskEncryptionSetType; + + @doc("Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots") + activeKey?: KeyForDiskEncryptionSet; + + @doc("Set this flag to true to enable auto-updating of this disk encryption set to the latest key version.") + rotationToLatestKeyVersionEnabled?: boolean; + + @doc("Multi-tenant application client id to access key vault in a different tenant. Setting the value to 'None' will clear the property.") + federatedClientId?: string; +} + @doc("The List resources which are encrypted with the disk encryption set.") model ResourceUriList is Azure.Core.Page; @@ -5295,6 +5757,51 @@ model CopyCompletionError { errorMessage: string; } +@doc("Snapshot update resource.") +model SnapshotUpdate { + @doc("Snapshot resource update properties.") + properties?: SnapshotUpdateProperties; + + @doc("Resource tags") + tags?: Record; + + @doc("The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot") + sku?: SnapshotSku; +} + +@doc("Snapshot resource update properties.") +model SnapshotUpdateProperties { + @doc("the Operating System type.") + osType?: OperatingSystemTypes; + + @doc("If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.") + diskSizeGB?: int32; + + @doc("Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.") + encryptionSettingsCollection?: EncryptionSettingsCollection; + + @doc("Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.") + encryption?: Encryption; + + @doc("Policy for accessing the disk via network.") + networkAccessPolicy?: NetworkAccessPolicy; + + @doc("ARM id of the DiskAccess resource for using private endpoints on disks.") + diskAccessId?: string; + + @doc("Indicates the OS on a snapshot supports hibernation.") + supportsHibernation?: boolean; + + @doc("Policy for controlling export on the disk.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("Additional authentication requirements when exporting or uploading to a disk or snapshot.") + dataAccessAuthMode?: DataAccessAuthMode; + + @doc("List of supported capabilities for the image from which the OS disk was created.") + supportedCapabilities?: SupportedCapabilities; +} + @doc("The List Resource Skus operation response.") model ResourceSkusResult is Azure.Core.Page; @@ -5511,6 +6018,12 @@ model RegionalSharingStatus { details?: string; } +@doc("Specifies information about the Shared Image Gallery that you want to update.") +model GalleryUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a Shared Image Gallery.") + properties?: GalleryProperties; +} + @doc("The Update Resource model definition.") model UpdateResourceDefinition { @doc("Resource Id") @@ -5636,6 +6149,12 @@ model GalleryImageFeature { value?: string; } +@doc("Specifies information about the gallery image definition that you want to update.") +model GalleryImageUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery image definition.") + properties?: GalleryImageProperties; +} + @doc("Describes the properties of a gallery image version.") model GalleryImageVersionProperties { @doc("The publishing profile of a gallery image Version.") @@ -5881,6 +6400,12 @@ model RegionalReplicationStatus { progress?: int32; } +@doc("Specifies information about the gallery image version that you want to update.") +model GalleryImageVersionUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery image version.") + properties?: GalleryImageVersionProperties; +} + @doc("Describes the properties of a gallery Application Definition.") model GalleryApplicationProperties { @doc("The description of this gallery Application Definition resource. This property is updatable.") @@ -5939,6 +6464,12 @@ model GalleryApplicationCustomActionParameter { description?: string; } +@doc("Specifies information about the gallery Application Definition that you want to update.") +model GalleryApplicationUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery Application Definition.") + properties?: GalleryApplicationProperties; +} + @doc("Describes the properties of a gallery image version.") model GalleryApplicationVersionProperties { @doc("The publishing profile of a gallery image version.") @@ -6010,6 +6541,12 @@ model UserArtifactSettings { model GalleryApplicationVersionSafetyProfile extends GalleryArtifactSafetyProfileBase {} +@doc("Specifies information about the gallery Application Version that you want to update.") +model GalleryApplicationVersionUpdate extends UpdateResourceDefinition { + @doc("Describes the properties of a gallery image version.") + properties?: GalleryApplicationVersionProperties; +} + @doc("Specifies information about the gallery sharing profile update.") model SharingUpdate { @doc("This property allows you to specify the operation type of gallery sharing update.

Possible values are:

**Add**

**Remove**

**Reset**") @@ -6519,6 +7056,11 @@ model CloudServiceVaultAndSecretReference { secretUrl?: string; } +model CloudServiceUpdate { + @doc("Resource tags") + tags?: Record; +} + @doc("InstanceView of CloudService as a whole") model CloudServiceInstanceView { @doc("Instance view statuses.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp index c78588f87d..4a282b4819 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-compute/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Microsoft.Compute; @@ -599,7 +601,7 @@ interface VirtualMachineScaleSetVMRunCommandsOperations { @header accept: "application/json, text/json"; }, - VirtualMachineRunCommandsListResult + ResourceListResult >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/dns.md b/packages/extensions/openapi-to-typespec/test/arm-dns/dns.md new file mode 100644 index 0000000000..e2dd30b8e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/dns.md @@ -0,0 +1,126 @@ +```yaml +library-name: Dns +namespace: Azure.ResourceManager.Dns +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/48a49f06399fbdf21f17406b5042f96a5d573bf0/specification/dns/resource-manager/readme.md +# tag: package-2018-05 +skip-csproj: true +modelerfour: + flatten-payloads: false + lenient-model-deduplication: true + +format-by-name-rules: + "tenantId": "uuid" + "ETag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + "*Guid": "uuid" + "ifMatch": "etag" + "IPv6Address": "ip-address" + "IPv4Address": "ip-address" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + SAS: Sas + SKU: Sku + SMB: Smb + NFS: Nfs + LRS: Lrs + ZRS: Zrs + GRS: Grs + TLS: Tls + AAD: Aad + GET: Get + PUT: Put + RecordType: DnsRecordType + ARecord: DnsARecordInfo + AaaaRecord: DnsAaaaRecordInfo + MxRecord: DnsMXRecordInfo + NsRecord: DnsNSRecordInfo + PtrRecord: DnsPtrRecordInfo + SrvRecord: DnsSrvRecordInfo + TxtRecord: DnsTxtRecordInfo + CnameRecord: DnsCnameRecordInfo + SoaRecord: DnsSoaRecordInfo + CaaRecord: DnsCaaRecordInfo + +override-operation-name: + RecordSets_ListByDnsZone: GetAllRecordData # Change back to GetRecords once the polymorphic resource change is merged. + DnsResourceReference_GetByTargetResources: GetDnsResourceReferencesByTargetResources + Zones_List: GetDnsZones + +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/A: DnsARecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/AAAA: DnsAaaaRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/CAA: DnsCaaRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/CNAME: DnsCnameRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/MX: DnsMXRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/NS: DnsNSRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/PTR: DnsPtrRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/SOA: DnsSoaRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/SRV: DnsSrvRecord + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}|Microsoft.Network/dnsZones/TXT: DnsTxtRecord + +directive: + - remove-operation: RecordSets_ListAllByDnsZone + - from: swagger-document + where: $.definitions + transform: > + $.RecordSet["x-ms-client-name"] = "DnsRecord"; + $.RecordSetListResult["x-ms-client-name"] = "DnsRecordListResult"; + $.ZoneUpdate["x-ms-client-name"] = "ZoneUpdateOptions"; + $.NsRecord.properties.nsdname["x-ms-client-name"] = "DnsNSDomainName"; + $.PtrRecord.properties.ptrdname["x-ms-client-name"] = "DnsPtrDomainName"; + $.RecordSetProperties.properties.TTL["x-ms-client-name"] = "TtlInSeconds"; + $.TxtRecord.properties.value["x-ms-client-name"] = "values"; + $.ZoneProperties.properties.maxNumberOfRecordsPerRecordSet["x-nullable"] = true; + $.ZoneProperties.properties.maxNumberOfRecordSets["x-ms-client-name"] = "maxNumberOfRecords"; + $.ZoneProperties.properties.maxNumberOfRecordsPerRecordSet["x-ms-client-name"] = "maxNumberOfRecordsPerRecord"; + $.ZoneProperties.properties.numberOfRecordSets["x-ms-client-name"] = "numberOfRecords"; + + # FooTime => FooTimeInSeconds + - from: swagger-document + where: $.definitions + transform: > + $.SoaRecord.properties.expireTime["x-ms-client-name"] = "expireTimeInSeconds"; + $.SoaRecord.properties.retryTime["x-ms-client-name"] = "retryTimeInSeconds"; + $.SoaRecord.properties.minimumTTL["x-ms-client-name"] = "minimumTtlInSeconds"; + $.SoaRecord.properties.refreshTime["x-ms-client-name"] = "refreshTimeInSeconds"; + + # Add Prepend Name + - from: swagger-document + where: $.definitions + transform: > + $.Zone["x-ms-client-name"] = "DnsZone"; + $.ZoneProperties.properties.zoneType["x-ms-enum"].name = "DnsZoneType"; + $.ZoneListResult["x-ms-client-name"] = "DnsZoneListResult"; + + # Mx Ns => MX NS + - from: swagger-document + where: $.definitions + transform: > + $.RecordSetProperties.properties.MXRecords["x-ms-client-name"] = "MXRecords"; + $.RecordSetProperties.properties.NSRecords["x-ms-client-name"] = "NSRecords"; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/resources.json b/packages/extensions/openapi-to-typespec/test/arm-dns/resources.json new file mode 100644 index 0000000000..bef4fee3ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/resources.json @@ -0,0 +1,903 @@ +{ + "Resources": { + "DnsARecord": { + "Name": "DnsARecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/A", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/A", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "A", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsAaaaRecord": { + "Name": "DnsAaaaRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/AAAA", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/AAAA", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "AAAA", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsCaaRecord": { + "Name": "DnsCaaRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CAA", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/CAA", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "CAA", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsCnameRecord": { + "Name": "DnsCnameRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/CNAME", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/CNAME", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "CNAME", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsMXRecord": { + "Name": "DnsMXRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/MX", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/MX", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "MX", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsNSRecord": { + "Name": "DnsNSRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/NS", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/NS", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "NS", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsPtrRecord": { + "Name": "DnsPtrRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/PTR", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/PTR", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "PTR", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsSoaRecord": { + "Name": "DnsSoaRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SOA", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/SOA", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "SOA", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsSrvRecord": { + "Name": "DnsSrvRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/SRV", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/SRV", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "SRV", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsTxtRecord": { + "Name": "DnsTxtRecord", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "GET", + "OperationID": "RecordSets_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a record set." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "PUT", + "OperationID": "RecordSets_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a record set within a DNS zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "PATCH", + "OperationID": "RecordSets_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a record set within a DNS zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT/{relativeRecordSetName}", + "Method": "DELETE", + "OperationID": "RecordSets_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a record set from a DNS zone. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/TXT", + "Method": "GET", + "OperationID": "RecordSets_ListByType", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByType", + "NextPageMethod": "ListByTypeNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the record sets of a specified type in a DNS zone." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["DnsZone"], + "SwaggerModelName": "DnsRecord", + "ResourceType": "Microsoft.Network/dnsZones/TXT", + "ResourceKey": "relativeRecordSetName", + "ResourceKeySegment": "TXT", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "DnsZone": { + "Name": "DnsZone", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "GET", + "OperationID": "Zones_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "PUT", + "OperationID": "Zones_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a DNS zone. Does not modify DNS records within the zone." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "PATCH", + "OperationID": "Zones_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a DNS zone. Does not modify DNS records within the zone." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", + "Method": "DELETE", + "OperationID": "Zones_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones", + "Method": "GET", + "OperationID": "Zones_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the DNS zones within a resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetDnsZones", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones", + "Method": "GET", + "OperationID": "Zones_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the DNS zones in all resource groups in a subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetAllRecordData", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets", + "Method": "GET", + "OperationID": "RecordSets_ListByDnsZone", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByDnsZone", + "NextPageMethod": "ListByDnsZoneNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all record sets in a DNS zone." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "DnsZone", + "ResourceType": "Microsoft.Network/dnsZones", + "ResourceKey": "zoneName", + "ResourceKeySegment": "dnsZones", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp new file mode 100644 index 0000000000..a4678459a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsRecord.tsp @@ -0,0 +1,124 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DnsZone.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Dns; +@doc("Describes a DNS record set (a collection of DNS records with the same name and type).") +@parentResource(DnsZone) +model DnsRecord is ProxyResource { + @doc("The name of the record set, relative to the name of the zone.") + @path + @key("relativeRecordSetName") + @segment("A") + name: string; + + @doc("The etag of the record set.") + etag?: string; +} + +@armResourceOperations +interface DnsRecords { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a record set.") + @operationId("RecordSets_Get") + get is ArmResourceRead< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set.") + @path + recordType: RecordType; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates a record set within a DNS zone.") + @operationId("RecordSets_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created).") + @path + recordType: RecordType; + + @doc("The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + @header + IfMatch?: string; + + @doc("Set to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored.") + @header + IfNoneMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates a record set within a DNS zone.") + @operationId("RecordSets_Update") + update is ArmCustomPatchSync< + DnsRecord, + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set.") + @path + recordType: RecordType; + + @doc("The etag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen etag value to prevent accidentally overwriting concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes a record set from a DNS zone. This operation cannot be undone.") + @operationId("RecordSets_Delete") + delete is ArmResourceDeleteSync< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).") + @path + recordType: RecordType; + + @doc("The etag of the record set. Omit this value to always delete the current record set. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the record sets of a specified type in a DNS zone.") + @operationId("RecordSets_ListByType") + listByType is ArmResourceListByParent< + DnsRecord, + { + ...BaseParameters; + + @doc("The type of record sets to enumerate.") + @path + recordType: RecordType; + + @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + @query("$top") + $top?: int32; + + @doc("The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .") + @query("$recordsetnamesuffix") + $recordsetnamesuffix?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp new file mode 100644 index 0000000000..f00db75762 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/DnsZone.tsp @@ -0,0 +1,129 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.Dns; +@doc("Describes a DNS zone.") +model DnsZone is TrackedResource { + @doc("The name of the DNS zone (without a terminating dot).") + @path + @key("zoneName") + @segment("dnsZones") + name: string; + + @doc("The etag of the zone.") + etag?: string; +} + +@armResourceOperations +interface DnsZones { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.") + @operationId("Zones_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates a DNS zone. Does not modify DNS records within the zone.") + @operationId("Zones_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DnsZone, + { + ...BaseParameters; + + @doc("The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + @header + IfMatch?: string; + + @doc("Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored.") + @header + IfNoneMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates a DNS zone. Does not modify DNS records within the zone.") + @operationId("Zones_Update") + update is ArmCustomPatchSync< + DnsZone, + ZoneUpdateOptions, + { + ...BaseParameters; + + @doc("The etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen etag value to prevent accidentally overwriting any concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.") + @operationId("Zones_Delete") + delete is ArmResourceDeleteAsync< + DnsZone, + { + ...BaseParameters; + + @doc("The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes.") + @header + IfMatch?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the DNS zones within a resource group.") + @operationId("Zones_ListByResourceGroup") + listByResourceGroup is ArmResourceListByParent< + DnsZone, + { + ...BaseParameters; + + @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + @query("$top") + $top?: int32; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the DNS zones in all resource groups in a subscription.") + @operationId("Zones_List") + list is ArmListBySubscription; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("RecordSets_ListByDnsZone") + @doc("Lists all record sets in a DNS zone.") + // FIXME: RecordSets_ListByDnsZone could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets") + @get + ListByDnsZone is Azure.Core.Foundations.Operation< + { + @doc("The name of the resource group.") + @path + resourceGroupName: string; + + @doc("The name of the DNS zone (without a terminating dot).") + @path + zoneName: string; + + @doc("The maximum number of record sets to return. If not specified, returns up to 100 record sets.") + @query("$top") + $top?: int32; + + @doc("The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only records that end with .") + @query("$recordsetnamesuffix") + $recordsetnamesuffix?: string; + + @doc("Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.") + @path + subscriptionId: string; + }, + ResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json new file mode 100644 index 0000000000..f1778f410f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json new file mode 100644 index 0000000000..a1a9f8467d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateARecordsetWithAliasTargetResource.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "TTL": 3600, + "metadata": { + "key1": "value1" + }, + "targetResource": { + "id": "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2" + } + } + }, + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + }, + "provisioningState": "Succeeded", + "targetResource": { + "id": "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + }, + "provisioningState": "Succeeded", + "targetResource": { + "id": "/subscriptions/726f8cd6-6459-4db4-8e6d-2cd2716904e2/resourceGroups/test/providers/Microsoft.Network/trafficManagerProfiles/testpp2" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create A recordset with alias target resource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json new file mode 100644 index 0000000000..b2ad924f92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateAaaaRecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json new file mode 100644 index 0000000000..7813071547 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCaaRecordset.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json new file mode 100644 index 0000000000..dce052f4ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateCnameRecordset.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "CNAME", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json new file mode 100644 index 0000000000..a54a77224c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateMxRecordset.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "MX", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json new file mode 100644 index 0000000000..69bbd2cae1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateNsRecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "NS", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json new file mode 100644 index 0000000000..703dfbb9eb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreatePtrRecordset.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json new file mode 100644 index 0000000000..a2eb01730c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSoaRecordset.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "SOA", + "relativeRecordSetName": "@", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create SOA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json new file mode 100644 index 0000000000..6feb34df98 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateSrvRecordset.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json new file mode 100644 index 0000000000..138a13918c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_CreateOrUpdate_CreateTxtRecordset.json @@ -0,0 +1,76 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "metadata": { + "key1": "value1" + } + } + }, + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + }, + "201": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_CreateOrUpdate", + "title": "Create TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json new file mode 100644 index 0000000000..903a035f96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteARecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json new file mode 100644 index 0000000000..3c2b4046e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteAaaaRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json new file mode 100644 index 0000000000..f5251c909d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCaaRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json new file mode 100644 index 0000000000..a9bace8a08 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteCnameRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json new file mode 100644 index 0000000000..a6afd45849 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteMxRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json new file mode 100644 index 0000000000..d89967fcb2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteNsRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json new file mode 100644 index 0000000000..0105914bc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeletePtrRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json new file mode 100644 index 0000000000..18f5e585a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteSrvRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json new file mode 100644 index 0000000000..c5e8cd550d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Delete_DeleteTxtRecordset.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "RecordSets_Delete", + "title": "Delete TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json new file mode 100644 index 0000000000..1385776f47 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetARecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json new file mode 100644 index 0000000000..6195b29efa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetAaaaRecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json new file mode 100644 index 0000000000..e4c5f9e431 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCaaRecordset.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json new file mode 100644 index 0000000000..5c0e387680 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetCnameRecordset.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CNAME", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json new file mode 100644 index 0000000000..76feb6e24d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetMxRecordset.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "MX", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json new file mode 100644 index 0000000000..881be2c77c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetNsRecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "NS", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json new file mode 100644 index 0000000000..b8ecf6eec2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetPtrRecordset.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json new file mode 100644 index 0000000000..1327fcd84c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSoaRecordset.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SOA", + "relativeRecordSetName": "@", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get SOA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json new file mode 100644 index 0000000000..83d04e81db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetSrvRecordset.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json new file mode 100644 index 0000000000..10dd61fa02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Get_GetTxtRecordset.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + } + }, + "operationId": "RecordSets_Get", + "title": "Get TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json new file mode 100644 index 0000000000..d13a90f41d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByDnsZone.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + }, + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + }, + { + "name": "record2", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record2", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record2.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByDnsZone", + "title": "List recordsets by zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json new file mode 100644 index 0000000000..3f833bb61c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListARecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "A", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List A recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json new file mode 100644 index 0000000000..cd7f2b46b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListAaaaRecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "AAAA", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List AAAA recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json new file mode 100644 index 0000000000..17df2357c6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCaaRecordsets.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CAA", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List CAA recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json new file mode 100644 index 0000000000..54f4f85179 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListCnameRecordsets.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "CNAME", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List CNAME recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json new file mode 100644 index 0000000000..d9d538d44e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListMxRecordsets.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "MX", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List MX recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json new file mode 100644 index 0000000000..741207591c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListNsRecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "NS", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List NS recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json new file mode 100644 index 0000000000..89283ec06b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListPtrRecordsets.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "PTR", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List PTR recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json new file mode 100644 index 0000000000..f2c94b043b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSoaRecordsets.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SOA", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List SOA recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json new file mode 100644 index 0000000000..5cbd25a66a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListSrvRecordsets.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "SRV", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List SRV recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json new file mode 100644 index 0000000000..37fab76dbb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_ListByType_ListTxtRecordsets.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "recordType": "TXT", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key1": "value1" + } + } + } + ] + } + } + }, + "operationId": "RecordSets_ListByType", + "title": "List TXT recordsets" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json new file mode 100644 index 0000000000..130f03eb3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchARecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "A", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/A", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1", + "properties": { + "ARecords": [ + { + "ipv4Address": "127.0.0.1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch A recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json new file mode 100644 index 0000000000..6f1fb6b9cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchAaaaRecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "AAAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/AAAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1", + "properties": { + "AAAARecords": [ + { + "ipv6Address": "::1" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch AAAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json new file mode 100644 index 0000000000..48a94505b0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCaaRecordset.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "CAA", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CAA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1", + "properties": { + "TTL": 3600, + "caaRecords": [ + { + "flags": 0, + "tag": "issue", + "value": "ca.contoso.com" + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch CAA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json new file mode 100644 index 0000000000..230747e7df --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchCnameRecordset.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "CNAME", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/CNAME", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1", + "properties": { + "CNAMERecord": { + "cname": "contoso.com" + }, + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch CNAME recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json new file mode 100644 index 0000000000..ea9e188dcc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchMxRecordset.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "MX", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/MX", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1", + "properties": { + "MXRecords": [ + { + "exchange": "mail.contoso.com", + "preference": 0 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch MX recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json new file mode 100644 index 0000000000..ac82206f61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchNsRecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "NS", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/NS", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1", + "properties": { + "NSRecords": [ + { + "nsdname": "ns1.contoso.com" + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch NS recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json new file mode 100644 index 0000000000..d5ee65e6e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchPtrRecordset.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "PTR", + "relativeRecordSetName": "1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "0.0.127.in-addr.arpa" + }, + "responses": { + "200": { + "body": { + "name": "1", + "type": "Microsoft.Network/dnsZones/PTR", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1", + "properties": { + "PTRRecords": [ + { + "ptrdname": "localhost" + } + ], + "TTL": 3600, + "fqdn": "1.0.0.127.in-addr.arpa", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch PTR recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json new file mode 100644 index 0000000000..7703649e5b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSoaRecordset.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "SOA", + "relativeRecordSetName": "@", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "@", + "type": "Microsoft.Network/dnsZones/SOA", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@", + "properties": { + "SOARecord": { + "email": "hostmaster.contoso.com", + "expireTime": 2419200, + "host": "ns1.contoso.com", + "minimumTTL": 300, + "refreshTime": 3600, + "retryTime": 300, + "serialNumber": 1 + }, + "TTL": 3600, + "fqdn": "zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch SOA recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json new file mode 100644 index 0000000000..7a0268aabf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchSrvRecordset.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "SRV", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/SRV", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1", + "properties": { + "SRVRecords": [ + { + "port": 80, + "priority": 0, + "target": "contoso.com", + "weight": 10 + } + ], + "TTL": 3600, + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch SRV recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json new file mode 100644 index 0000000000..9412474827 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/RecordSets_Update_PatchTxtRecordset.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "properties": { + "metadata": { + "key2": "value2" + } + } + }, + "recordType": "TXT", + "relativeRecordSetName": "record1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "record1", + "type": "Microsoft.Network/dnsZones/TXT", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1", + "properties": { + "TTL": 3600, + "TXTRecords": [ + { + "value": [ + "string1", + "string2" + ] + } + ], + "fqdn": "record1.zone1", + "metadata": { + "key2": "value2" + } + } + } + } + }, + "operationId": "RecordSets_Update", + "title": "Patch TXT recordset" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json new file mode 100644 index 0000000000..f546b6b2f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_CreateOrUpdate.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "location": "Global", + "tags": { + "key1": "value1" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2, + "zoneType": "Public" + }, + "tags": { + "key1": "value1" + } + } + }, + "201": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2, + "zoneType": "Public" + }, + "tags": { + "key1": "value1" + } + } + } + }, + "operationId": "Zones_CreateOrUpdate", + "title": "Create zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json new file mode 100644 index 0000000000..3b91078c3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://asyncoperationstatusurl" + } + }, + "204": {} + }, + "operationId": "Zones_Delete", + "title": "Delete zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json new file mode 100644 index 0000000000..542112639a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key1": "value1" + } + } + } + }, + "operationId": "Zones_Get", + "title": "Get zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json new file mode 100644 index 0000000000..1be98baee4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_List.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/providers/Microsoft.Network/dnsZones?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key1": "value1" + } + }, + { + "name": "zone2", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg2/providers/Microsoft.Network/dnsZones/zone2", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-02.azure-dns.com", + "ns2-02.azure-dns.net", + "ns3-02.azure-dns.org", + "ns4-02.azure-dns.info" + ], + "numberOfRecordSets": 300 + } + } + ] + } + } + }, + "operationId": "Zones_List", + "title": "List zones by subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json new file mode 100644 index 0000000000..73dd504e2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_ListByResourceGroup.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://servicehost/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones?api-version=2018-05-01&$skipToken=skipToken", + "value": [ + { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key1": "value1" + } + }, + { + "name": "zone2", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone2", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-02.azure-dns.com", + "ns2-02.azure-dns.net", + "ns3-02.azure-dns.org", + "ns4-02.azure-dns.info" + ], + "numberOfRecordSets": 300 + } + } + ] + } + } + }, + "operationId": "Zones_ListByResourceGroup", + "title": "List zones by resource group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json new file mode 100644 index 0000000000..4fe00a39a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/examples/2018-05-01/Zones_Update.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-01", + "parameters": { + "tags": { + "key2": "value2" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "zoneName": "zone1" + }, + "responses": { + "200": { + "body": { + "name": "zone1", + "type": "Microsoft.Network/dnsZones", + "etag": "00000000-0000-0000-0000-000000000000", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1", + "location": "global", + "properties": { + "maxNumberOfRecordSets": 5000, + "nameServers": [ + "ns1-01.azure-dns.com", + "ns2-01.azure-dns.net", + "ns3-01.azure-dns.org", + "ns4-01.azure-dns.info" + ], + "numberOfRecordSets": 2 + }, + "tags": { + "key2": "value2" + } + } + } + }, + "operationId": "Zones_Update", + "title": "Patch zone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp new file mode 100644 index 0000000000..da2a15bf60 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/main.tsp @@ -0,0 +1,39 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsRecord.tsp"; +import "./DnsZone.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "DnsManagementClient", +}) +@versioned(Versions) +@doc("The DNS Management Client.") +namespace Azure.ResourceManager.Dns; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2018-05-01 API version.") + v2018_05_01: "2018-05-01", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp new file mode 100644 index 0000000000..34398ee09a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/models.tsp @@ -0,0 +1,325 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.Dns; + +interface Operations extends Azure.ResourceManager.Operations {} + +@fixed +enum RecordType { + A, + AAAA, + CAA, + CNAME, + MX, + NS, + PTR, + SOA, + SRV, + TXT, +} + +@doc("The type of this DNS zone (Public or Private).") +@fixed +enum DnsZoneType { + Public, + Private, +} + +@doc("Represents the properties of the records in the record set.") +model RecordSetProperties { + @doc("The metadata attached to the record set.") + metadata?: Record; + + @doc("The TTL (time-to-live) of the records in the record set.") + @projectedName("json", "TTL") + ttlInSeconds?: int32; + + @doc("Fully qualified domain name of the record set.") + @visibility("read") + fqdn?: string; + + @doc("provisioning State of the record set.") + @visibility("read") + provisioningState?: string; + + @doc("A reference to an azure resource from where the dns resource value is taken.") + targetResource?: SubResource; + + @doc("The list of A records in the record set.") + @projectedName("json", "ARecords") + aRecords?: ARecord[]; + + @doc("The list of AAAA records in the record set.") + @projectedName("json", "AAAARecords") + aaaaRecords?: AaaaRecord[]; + + @doc("The list of MX records in the record set.") + MXRecords?: MxRecord[]; + + @doc("The list of NS records in the record set.") + NSRecords?: NsRecord[]; + + @doc("The list of PTR records in the record set.") + @projectedName("json", "PTRRecords") + ptrRecords?: PtrRecord[]; + + @doc("The list of SRV records in the record set.") + @projectedName("json", "SRVRecords") + srvRecords?: SrvRecord[]; + + @doc("The list of TXT records in the record set.") + @projectedName("json", "TXTRecords") + txtRecords?: TxtRecord[]; + + @doc("The CNAME record in the record set.") + @projectedName("json", "CNAMERecord") + cnameRecord?: CnameRecord; + + @doc("The SOA record in the record set.") + @projectedName("json", "SOARecord") + soaRecord?: SoaRecord; + + @doc("The list of CAA records in the record set.") + caaRecords?: CaaRecord[]; +} + +@doc("A reference to a another resource") +model SubResource { + @doc("Resource Id.") + id?: string; +} + +@doc("An A record.") +model ARecord { + @doc("The IPv4 address of this A record.") + ipv4Address?: string; +} + +@doc("An AAAA record.") +model AaaaRecord { + @doc("The IPv6 address of this AAAA record.") + ipv6Address?: string; +} + +@doc("An MX record.") +model MxRecord { + @doc("The preference value for this MX record.") + preference?: int32; + + @doc("The domain name of the mail host for this MX record.") + exchange?: string; +} + +@doc("An NS record.") +model NsRecord { + @doc("The name server name for this NS record.") + @projectedName("json", "nsdname") + dnsNSDomainName?: string; +} + +@doc("A PTR record.") +model PtrRecord { + @doc("The PTR target domain name for this PTR record.") + @projectedName("json", "ptrdname") + dnsPtrDomainName?: string; +} + +@doc("An SRV record.") +model SrvRecord { + @doc("The priority value for this SRV record.") + priority?: int32; + + @doc("The weight value for this SRV record.") + weight?: int32; + + @doc("The port value for this SRV record.") + port?: int32; + + @doc("The target domain name for this SRV record.") + target?: string; +} + +@doc("A TXT record.") +model TxtRecord { + @doc("The text value of this TXT record.") + @projectedName("json", "value") + values?: string[]; +} + +@doc("A CNAME record.") +model CnameRecord { + @doc("The canonical name for this CNAME record.") + cname?: string; +} + +@doc("An SOA record.") +model SoaRecord { + @doc("The domain name of the authoritative name server for this SOA record.") + host?: string; + + @doc("The email contact for this SOA record.") + email?: string; + + @doc("The serial number for this SOA record.") + serialNumber?: int32; + + @doc("The refresh value for this SOA record.") + @projectedName("json", "refreshTime") + refreshTimeInSeconds?: int32; + + @doc("The retry time for this SOA record.") + @projectedName("json", "retryTime") + retryTimeInSeconds?: int32; + + @doc("The expire time for this SOA record.") + @projectedName("json", "expireTime") + expireTimeInSeconds?: int32; + + @doc("The minimum value for this SOA record. By convention this is used to determine the negative caching duration.") + @projectedName("json", "minimumTTL") + minimumTtlInSeconds?: int32; +} + +@doc("A CAA record.") +model CaaRecord { + @doc("The flags for this CAA record as an integer between 0 and 255.") + flags?: int32; + + @doc("The tag for this CAA record.") + tag?: string; + + @doc("The value for this CAA record.") + value?: string; +} + +@doc("An error response from the service.") +@error +model CloudError { + @doc("Cloud error body.") + error?: CloudErrorBody; +} + +@doc("An error response from the service.") +model CloudErrorBody { + @doc("An identifier for the error. Codes are invariant and are intended to be consumed programmatically.") + code?: string; + + @doc("A message describing the error, intended to be suitable for display in a user interface.") + message?: string; + + @doc("The target of the particular error. For example, the name of the property in error.") + target?: string; + + @doc("A list of additional details about the error.") + details?: CloudErrorBody[]; +} + +@doc("Represents the properties of the zone.") +model ZoneProperties { + @doc("The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + @projectedName("json", "maxNumberOfRecordSets") + maxNumberOfRecords?: int32; + + @doc("The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + @projectedName("json", "maxNumberOfRecordsPerRecordSet") + maxNumberOfRecordsPerRecord?: int32; + + @doc("The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + @projectedName("json", "numberOfRecordSets") + numberOfRecords?: int32; + + @doc("The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored.") + @visibility("read") + nameServers?: string[]; + + @doc("The type of this DNS zone (Public or Private).") + zoneType?: DnsZoneType; + + @doc("A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private.") + registrationVirtualNetworks?: SubResource[]; + + @doc("A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private.") + resolutionVirtualNetworks?: SubResource[]; +} + +@doc("Common properties of an Azure Resource Manager resource") +model Resource { + @doc("Resource ID.") + @visibility("read") + id?: string; + + @doc("Resource name.") + @visibility("read") + name?: string; + + @doc("Resource type.") + @visibility("read") + type?: string; + + @doc("Resource location.") + @visibility("read", "create") + // FIXME: (resource-key-guessing) - Verify that this property is the resource key, if not please update the model with the right one + @key + location: string; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Describes a request to update a DNS zone.") +model ZoneUpdateOptions { + @doc("Resource tags.") + tags?: Record; +} + +@doc("Represents the properties of the Dns Resource Reference Request.") +model DnsResourceReferenceRequest { + @doc("The properties of the Resource Reference Request.") + properties?: DnsResourceReferenceRequestProperties; +} + +@doc("Represents the properties of the Dns Resource Reference Request.") +model DnsResourceReferenceRequestProperties { + @doc("A list of references to azure resources for which referencing dns records need to be queried.") + targetResources?: SubResource[]; +} + +@doc("Represents the properties of the Dns Resource Reference Result.") +model DnsResourceReferenceResult { + @doc("The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.") + properties?: DnsResourceReferenceResultProperties; +} + +@doc("The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request.") +model DnsResourceReferenceResultProperties { + @doc("The result of dns resource reference request. A list of dns resource references for each of the azure resource in the request") + dnsResourceReferences?: DnsResourceReference[]; +} + +@doc("Represents a single Azure resource and its referencing DNS records.") +model DnsResourceReference { + @doc("A list of dns Records ") + dnsResources?: SubResource[]; + + @doc("A reference to an azure resource from where the dns resource value is taken.") + targetResource?: SubResource; +} + +@doc("Parameters supplied to update a record set.") +model RecordSetUpdateParameters { + @doc("Specifies information about the record set being updated.") + @projectedName("json", "RecordSet") + recordSet?: DnsRecord; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp new file mode 100644 index 0000000000..12d713a36f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/routes.tsp @@ -0,0 +1,28 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.Dns; + +interface DnsResourceReferenceOperations { + @doc("Returns the DNS records specified by the referencing targetResourceIds.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.Network/getDnsResourceReference") + @post + GetByTargetResources is Azure.Core.Foundations.Operation< + { + @doc("Specifies the Azure subscription ID, which uniquely identifies the Microsoft Azure subscription.") + @path + subscriptionId: string; + + @doc("Properties for dns resource reference request.") + @body + parameters: DnsResourceReferenceRequest; + }, + DnsResourceReferenceResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..475477bfc3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-dns/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/dns.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md new file mode 100644 index 0000000000..aa5e9813f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/machinelearningservices.md @@ -0,0 +1,610 @@ +```yaml +library-name: MachineLearning +namespace: Azure.ResourceManager.MachineLearning +isAzureSpec: true +isArm: true +require: https://github.com/Azure/azure-rest-api-specs/blob/3eb9ec8e9c8f717c6b461c4c0f49a4662fb948fd/specification/machinelearningservices/resource-manager/readme.md +#tag: package-preview-2023-06 +skip-csproj: true +modelerfour: + flatten-payloads: false +deserialize-null-collection-as-null-value: true + +#mgmt-debug: +# show-serialized-names: true + +format-by-name-rules: + "tenantId": "uuid" + "etag": "etag" + "location": "azure-location" + "*Uri": "Uri" + "*Uris": "Uri" + +acronym-mapping: + CPU: Cpu + CPUs: Cpus + Os: OS + Ip: IP + Ips: IPs|ips + ID: Id + IDs: Ids + VM: Vm + VMs: Vms + Vmos: VmOS + VMScaleSet: VmScaleSet + DNS: Dns + VPN: Vpn + NAT: Nat + WAN: Wan + Ipv4: IPv4|ipv4 + Ipv6: IPv6|ipv6 + Ipsec: IPsec|ipsec + SSO: Sso + URI: Uri + Etag: ETag|etag + AKS: Aks + USD: Usd + PAT: Pat + SAS: Sas + LRS: Lrs + AAD: Aad + AML: Aml + VCPU: VCpu|vCpu + VCPUs: VCpus|vCpus + +override-operation-name: + Quotas_List: GetMachineLearningQuotas + Quotas_Update: UpdateMachineLearningQuotas + Usages_List: GetMachineLearningUsages + VirtualMachineSizes_List: GetMachineLearningVmSizes + +no-property-type-replacement: + - ResourceId + - VirtualMachineImage + +request-path-to-resource-name: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}: MachineLearningCodeContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}: MachineLearningCodeVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}: MachineLearningComponentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}: MachineLearningComponentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}: MachineLearningDataContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}: MachineLearningDataVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}: MachineLearningEnvironmentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}: MachineLearningEnvironmentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}: MachineLearningModelContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}: MachineLearningModelVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}: MachineLearningRegistryCodeContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}: MachineLearningRegistryCodeVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}: MachineLearninRegistryComponentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}: MachineLearninRegistryComponentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}: MachineLearningRegistryDataContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}: MachineLearningRegistryDataVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}: MachineLearningRegistryEnvironmentContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}: MachineLearningRegistryEnvironmentVersion + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}: MachineLearningRegistryModelContainer + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}: MachineLearningRegistryModelVersion + +prepend-rp-prefix: + - Feature + - FeatureProperties + - LabelingJob + - Registry + - Webhook + - WebhookType + - AllFeatures + +rename-mapping: + FeaturesetContainer: MachineLearningFeatureSetContainer + FeaturesetContainerProperties: MachineLearningFeatureSetContainerProperties + FeaturesetJob: MachineLearningFeatureSetJob + FeaturesetVersion: MachineLearningFeatureSetVersion + FeaturesetVersionBackfillRequest: FeatureSetVersionBackfillContent + FeaturesetVersionProperties: MachineLearningFeatureSetVersionProperties + FeaturestoreEntityContainer: MachineLearningFeatureStoreEntityContainer + FeaturestoreEntityContainerProperties: MachineLearningFeatureStoreEntityContainerProperties + FeaturestoreEntityVersion: MachineLearningFeaturestoreEntityVersion + FeaturestoreEntityVersionProperties: MachineLearningFeatureStoreEntityVersionProperties + FeaturestoreJobType: FeatureStoreJobType + ComputeInstanceProperties.setupScripts: SetupScriptsSettings + Workspace: MachineLearningWorkspace + ComputeResource: MachineLearningCompute + Compute: MachineLearningComputeProperties + Compute.resourceId: -|arm-id + ComputeInstance: MachineLearningComputeInstance + ComputeInstanceProperties: MachineLearningComputeInstanceProperties + AKS: MachineLearningAksCompute + AKSSchemaProperties: MachineLearningAksComputeProperties + Kubernetes: MachineLearningKubernetesCompute + KubernetesProperties: MachineLearningKubernetesProperties + VirtualMachine: MachineLearningVirtualMachineCompute + VirtualMachineSchemaProperties: MachineLearningVirtualMachineProperties + HDInsight: MachineLearningHDInsightCompute + HDInsightProperties: MachineLearningHDInsightProperties + DataFactory: MachineLearningDataFactoryCompute + Databricks: MachineLearningDatabricksCompute + DatabricksProperties: MachineLearningDatabricksProperties + DataLakeAnalytics: MachineLearningDataLakeAnalytics + DataLakeAnalyticsSchemaProperties: MachineLearningDataLakeAnalyticsProperties + SynapseSpark: MachineLearningSynapseSpark + SynapseSparkProperties: MachineLearningSynapseSparkProperties + ProvisioningState: MachineLearningProvisioningState + ListWorkspaceKeysResult: MachineLearningWorkspaceGetKeysResult + ListWorkspaceKeysResult.userStorageArmId: UserStorageResourceId + RegistryListCredentialsResult: MachineLearningContainerRegistryCredentials + Password: MachineLearningPasswordDetail + BatchDeploymentTrackedResource: MachineLearningBatchDeployment + BatchDeployment: MachineLearningBatchDeploymentProperties + BatchEndpointTrackedResource: MachineLearningBatchEndpoint + BatchEndpoint: MachineLearningBatchEndpointProperties + AssetContainer: MachineLearningAssetContainer + ResourceBase: MachineLearningResourceBase + AssetBase: MachineLearningAssetBase + JobBaseResource: MachineLearningJob + JobBase: MachineLearningJobProperties + CommandJob: MachineLearningCommandJob + CodeContainerResource: MachineLearningCodeContainer + CodeContainer: MachineLearningCodeContainerProperties + CodeVersionResource: MachineLearningCodeVersion + CodeVersion: MachineLearningCodeVersionProperties + ComponentContainerResource: MachineLearningComponentContainer + ComponentContainer: MachineLearningComponentContainerProperties + DataVersionBaseResource: MachineLearningDataVersion + DataVersionBase: MachineLearningDataVersionProperties + EnvironmentContainerResource: MachineLearningEnvironmentContainer + EnvironmentContainer: MachineLearningEnvironmentContainerProperties + EnvironmentVersionResource: MachineLearningEnvironmentVersion + EnvironmentVersion: MachineLearningEnvironmentVersionProperties + ComponentVersionResource: MachineLearningComponentVersion + ComponentVersion: MachineLearningComponentVersionProperties + DataContainerResource: MachineLearningDataContainer + DataContainer: MachineLearningDataContainerProperties + DatastoreResource: MachineLearningDatastore + Datastore: MachineLearningDatastoreProperties + MLTableData: MachineLearningTable + ResourceQuota: MachineLearningResourceQuota + ModelContainerResource: MachineLearningModelContainer + ModelContainer: MachineLearningModelContainerProperties + ModelVersionResource: MachineLearningModelVersion + ModelVersion: MachineLearningModelVersionProperties + OnlineDeploymentTrackedResource: MachineLearningOnlineDeployment + OnlineDeployment: MachineLearningOnlineDeploymentProperties + OnlineEndpointTrackedResource: MachineLearningOnlineEndpoint + OnlineEndpoint: MachineLearningOnlineEndpointProperties + Schedule: MachineLearningSchedule + ScheduleProperties: MachineLearningScheduleProperties + VirtualMachineSize: MachineLearningVmSize + WorkspaceConnectionPropertiesV2BasicResource: MachineLearningWorkspaceConnection + WorkspaceConnectionPropertiesV2: MachineLearningWorkspaceConnectionProperties + UpdateWorkspaceQuotas: MachineLearningWorkspaceQuotaUpdate + QuotaUpdateParameters: MachineLearningQuotaUpdateContent + EncryptionProperty: MachineLearningEncryptionSetting + EncryptionStatus: MachineLearningEncryptionStatus + KeyVaultProperties: MachineLearningEncryptionKeyVaultProperties + KeyVaultProperties.keyVaultArmId: -|arm-id + IdentityForCmk: MachineLearningCmkIdentity + IdentityForCmk.userAssignedIdentity: -|arm-id + NotebookResourceInfo: MachineLearningNotebookResourceInfo + SharedPrivateLinkResource: MachineLearningSharedPrivateLinkResource + SharedPrivateLinkResource.properties.privateLinkResourceId: -|arm-id + Workspace.properties.storageHnsEnabled: IsStorageHnsEnabled + Workspace.properties.v1LegacyMode: IsV1LegacyMode + DiagnoseResponseResult: MachineLearningWorkspaceDiagnoseResult + DiagnoseWorkspaceParameters: MachineLearningWorkspaceDiagnoseContent + DiagnoseRequestProperties: MachineLearningWorkspaceDiagnoseProperties + NotebookAccessTokenResult: MachineLearningWorkspaceNotebookAccessTokenResult + ListNotebookKeysResult: MachineLearningWorkspaceGetNotebookKeysResult + FqdnEndpointsPropertyBag: MachineLearningFqdnEndpoints + FqdnEndpoints: MachineLearningFqdnEndpointsProperties + ListStorageAccountKeysResult: MachineLearningWorkspaceGetStorageAccountKeysResult + AmlUserFeature: MachineLearningUserFeature + DatastoreCredentials: MachineLearningDatastoreCredentials + AccountKeyDatastoreCredentials: MachineLearningAccountKeyDatastoreCredentials + CertificateDatastoreCredentials: MachineLearningCertificateDatastoreCredentials + NoneDatastoreCredentials: MachineLearningNoneDatastoreCredentials + SasDatastoreCredentials: MachineLearningSasDatastoreCredentials + ServicePrincipalDatastoreCredentials: MachineLearningServicePrincipalDatastoreCredentials + DatastoreSecrets: MachineLearningDatastoreSecrets + CertificateDatastoreSecrets: MachineLearningCertificateDatastoreSecrets + SasDatastoreSecrets: MachineLearningSasDatastoreSecrets + ServicePrincipalDatastoreSecrets: MachineLearningServicePrincipalDatastoreSecrets + AccountKeyDatastoreSecrets: MachineLearningAccountKeyDatastoreSecrets + ComputeSecrets: MachineLearningComputeSecrets + AksComputeSecrets: MachineLearningAksComputeSecrets + DatabricksComputeSecrets: MachineLearningDatabricksComputeSecrets + VirtualMachineSecrets: MachineLearningVirtualMachineSecrets + AksNetworkingConfiguration: MachineLearningAksNetworkingConfiguration + AksNetworkingConfiguration.subnetId: -|arm-id + ClusterPurpose: MachineLearningClusterPurpose + LoadBalancerType: MachineLearningLoadBalancerType + SslConfiguration: MachineLearningSslConfiguration + SystemService: MachineLearningComputeSystemService + IdentityConfiguration: MachineLearningIdentityConfiguration + ManagedIdentity: MachineLearningManagedIdentity + ManagedIdentity.resourceId: -|arm-id + UserIdentity: MachineLearningUserIdentity + PartialMinimalTrackedResource: MachineLearningResourcePatch + PartialMinimalTrackedResourceWithIdentity: MachineLearningResourcePatchWithIdentity + PartialSku: MachineLearningSkuPatch + ApplicationSharingPolicy: MachineLearningApplicationSharingPolicy + AssetReferenceBase: MachineLearningAssetReferenceBase + DataPathAssetReference: MachineLearningDataPathAssetReference + IdAssetReference: MachineLearningIdAssetReference + IdAssetReference.assetId: -|arm-id + OutputPathAssetReference: MachineLearningOutputPathAssetReference + AssignedUser: MachineLearningComputeInstanceAssignedUser + AutoPauseProperties: MachineLearningAutoPauseProperties + AutoPauseProperties.enabled: IsEnabled + Autosave: MachineLearningComputeInstanceAutosave + ComputeInstanceConnectivityEndpoints: MachineLearningComputeInstanceConnectivityEndpoints + ComputeInstanceContainer: MachineLearningComputeInstanceContainer + ComputeInstanceEnvironmentInfo: MachineLearningComputeInstanceEnvironmentInfo + Network: MachineLearningNetwork + ComputeInstanceCreatedBy: MachineLearningComputeInstanceCreatedBy + ComputeInstanceAuthorizationType: MachineLearningComputeInstanceAuthorizationType + ComputeInstanceApplication: MachineLearningComputeInstanceApplication + ComputeInstanceDataDisk: MachineLearningComputeInstanceDataDisk + ComputeInstanceDataMount: MachineLearningComputeInstanceDataMount + MountAction: MachineLearningMountAction + MountState: MachineLearningMountState + SourceType: MachineLearningSourceType + ComputeInstanceLastOperation: MachineLearningComputeInstanceLastOperation + OperationName: MachineLearningOperationName + OperationStatus: MachineLearningOperationStatus + OperationTrigger: MachineLearningOperationTrigger + ComputeInstanceSshSettings: MachineLearningComputeInstanceSshSettings + SshPublicAccess: MachineLearningSshPublicAccess + ComputeInstanceState: MachineLearningComputeInstanceState + ComputePowerAction: MachineLearningComputePowerAction + ComputeStartStopSchedule: MachineLearningComputeStartStopSchedule + ComputeStartStopSchedule.recurrence: RecurrenceSchedule + ComputeStartStopSchedule.cron: CronSchedule + ProvisioningStatus: MachineLearningComputeProvisioningStatus + ScheduleBase: MachineLearningScheduleBase + ScheduleStatus: MachineLearningScheduleStatus + TriggerType: MachineLearningTriggerType + RecurrenceTrigger: MachineLearningRecurrenceTrigger + ConnectionCategory: MachineLearningConnectionCategory + ContainerType: MachineLearningContainerType + DeploymentLogs: MachineLearningDeploymentLogs + DeploymentLogsRequest: MachineLearningDeploymentLogsContent + DiagnoseResponseResultValue: MachineLearningDiagnoseResultValue + DiagnoseResult: MachineLearningDiagnoseResult + DiagnoseResultLevel: MachineLearningDiagnoseResultLevel + PartialManagedServiceIdentity: MachineLearningPartialManagedServiceIdentity + AutoScaleProperties: MachineLearningAutoScaleProperties + AutoScaleProperties.enabled: IsEnabled + Seasonality: ForecastingSeasonality + AzureBlobDatastore: MachineLearningAzureBlobDatastore + AzureDataLakeGen1Datastore: MachineLearningAzureDataLakeGen1Datastore + AzureDataLakeGen2Datastore: MachineLearningAzureDataLakeGen2Datastore + AzureFileDatastore: MachineLearningAzureFileDatastore + BatchLoggingLevel: MachineLearningBatchLoggingLevel + BatchOutputAction: MachineLearningBatchOutputAction + BatchRetrySettings: MachineLearningBatchRetrySettings + BillingCurrency: MachineLearningBillingCurrency + BuildContext: MachineLearningBuildContext + EnvironmentType: MachineLearningEnvironmentType + OperatingSystemType: MachineLearningOperatingSystemType + InferenceContainerProperties: MachineLearningInferenceContainerProperties + Caching: MachineLearningCachingType + Classification: ClassificationTask + CodeConfiguration: MachineLearningCodeConfiguration + JobLimits: MachineLearningJobLimits + SweepJobLimits: MachineLearningSweepJobLimits + CommandJobLimits: MachineLearningCommandJobLimits + ContainerResourceRequirements: MachineLearningContainerResourceRequirements + ContainerResourceSettings: MachineLearningContainerResourceSettings + TriggerBase: MachineLearningTriggerBase + JobInput: MachineLearningJobInput + CustomModelJobInput: MachineLearningCustomModelJobInput + LiteralJobInput: MachineLearningLiteralJobInput + MLFlowModelJobInput: MachineLearningFlowModelJobInput + MLTableJobInput: MachineLearningTableJobInput + TritonModelJobInput: MachineLearningTritonModelJobInput + UriFileJobInput: MachineLearningUriFileJobInput + UriFolderJobInput: MachineLearningUriFolderJobInput + JobOutput: MachineLearningJobOutput + CustomModelJobOutput: MachineLearningCustomModelJobOutput + MLFlowModelJobOutput: MachineLearningFlowModelJobOutput + MLTableJobOutput: MachineLearningTableJobOutput + TritonModelJobOutput: MachineLearningTritonModelJobOutput + UriFileJobOutput: MachineLearningUriFileJobOutput + UriFolderJobOutput: MachineLearningUriFolderJobOutput + DataType: MachineLearningDataType + OnlineScaleSettings: MachineLearningOnlineScaleSettings + DefaultScaleSettings: MachineLearningDefaultScaleSettings + TargetUtilizationScaleSettings: MachineLearningTargetUtilizationScaleSettings + DeploymentProvisioningState: MachineLearningDeploymentProvisioningState + ResourceConfiguration: MachineLearningResourceConfiguration + DeploymentResourceConfiguration: MachineLearningDeploymentResourceConfiguration + JobResourceConfiguration: MachineLearningJobResourceConfiguration + DistributionConfiguration: MachineLearningDistributionConfiguration + Mpi: MpiDistributionConfiguration + PyTorch: PyTorchDistributionConfiguration + TensorFlow: TensorFlowDistributionConfiguration + EarlyTerminationPolicy: MachineLearningEarlyTerminationPolicy + EgressPublicNetworkAccessType: MachineLearningEgressPublicNetworkAccessType + EndpointAuthKeys: MachineLearningEndpointAuthKeys + EndpointAuthMode: MachineLearningEndpointAuthMode + EndpointAuthToken: MachineLearningEndpointAuthToken + EndpointComputeType: MachineLearningEndpointComputeType + EndpointDeploymentPropertiesBase: MachineLearningEndpointDeploymentProperties + EndpointPropertiesBase: MachineLearningEndpointProperties + EndpointProvisioningState: MachineLearningEndpointProvisioningState + EndpointScheduleAction: MachineLearningEndpointScheduleAction + ErrorResponse: MachineLearningError + EstimatedVMPrice: MachineLearningEstimatedVMPrice + VMPriceOSType: MachineLearningVMPriceOSType + VMTier: MachineLearningVmTier + EstimatedVMPrices: MachineLearningEstimatedVMPrices + UnitOfMeasure: MachineLearningUnitOfMeasure + FeatureLags: MachineLearningFeatureLag + FeaturizationMode: MachineLearningFeaturizationMode + FeaturizationSettings: MachineLearningFeaturizationSettings + FlavorData: MachineLearningFlavorData + FqdnEndpoint: MachineLearningFqdnEndpoint + FqdnEndpointDetail: MachineLearningFqdnEndpointDetail + Goal: MachineLearningGoal + InputDeliveryMode: MachineLearningInputDeliveryMode + OutputDeliveryMode: MachineLearningOutputDeliveryMode + InstanceTypeSchema: MachineLearningInstanceTypeSchema + InstanceTypeSchemaResources: MachineLearningInstanceTypeSchemaResources + ScheduleActionBase: MachineLearningScheduleAction + JobScheduleAction: MachineLearningJobScheduleAction + JobService: MachineLearningJobService + JobStatus: MachineLearningJobStatus + KeyType: MachineLearningKeyType + KubernetesOnlineDeployment: MachineLearningKubernetesOnlineDeployment + ListViewType: MachineLearningListViewType + LogVerbosity: MachineLearningLogVerbosity + ManagedIdentityAuthTypeWorkspaceConnectionProperties: MachineLearningManagedIdentityAuthTypeWorkspaceConnection + WorkspaceConnectionManagedIdentity: MachineLearningWorkspaceConnectionManagedIdentity + WorkspaceConnectionManagedIdentity.resourceId: -|arm-id + NoneAuthTypeWorkspaceConnectionProperties: MachineLearningNoneAuthTypeWorkspaceConnection + PATAuthTypeWorkspaceConnectionProperties: MachineLearningPATAuthTypeWorkspaceConnection + SASAuthTypeWorkspaceConnectionProperties: MachineLearningSASAuthTypeWorkspaceConnection + UsernamePasswordAuthTypeWorkspaceConnectionProperties: MachineLearningUsernamePasswordAuthTypeWorkspaceConnection + ConnectionAuthType: MachineLearningConnectionAuthType + ManagedOnlineDeployment: MachineLearningManagedOnlineDeployment + ModelSize: MachineLearningModelSize + NodeState: MachineLearningNodeState + NodeStateCounts: MachineLearningNodeStateCounts + NotebookPreparationError: MachineLearningNotebookPreparationError + Objective: MachineLearningObjective + OnlineRequestSettings: MachineLearningOnlineRequestSettings + OrderString: MachineLearningOrderString + OsType: MachineLearningOSType + PipelineJob: MachineLearningPipelineJob + WorkspacePrivateEndpointResource: MachineLearningPrivateEndpoint + WorkspacePrivateEndpointResource.id: -|arm-id + WorkspacePrivateEndpointResource.subnetArmId: -|arm-id + ProbeSettings: MachineLearningProbeSettings + PublicNetworkAccessType: MachineLearningPublicNetworkAccessType + QuotaBaseProperties: MachineLearningQuotaProperties + QuotaUnit: MachineLearningQuotaUnit + RecurrenceFrequency: MachineLearningRecurrenceFrequency + RecurrenceSchedule: MachineLearningRecurrenceSchedule + WeekDay: MachineLearningDayOfWeek + RegenerateEndpointKeysRequest: MachineLearningEndpointKeyRegenerateContent + Regression: AutoMLVerticalRegression + RegressionModels: AutoMLVerticalRegressionModel + RegressionPrimaryMetrics: AutoMLVerticalRegressionPrimaryMetric + RemoteLoginPortPublicAccess: MachineLearningRemoteLoginPortPublicAccess + ResourceName: MachineLearningResourceName + Route: MachineLearningInferenceContainerRoute + ScaleSettings: AmlComputeScaleSettings + ScheduleListViewType: MachineLearningScheduleListViewType + ScheduleProvisioningState: MachineLearningScheduleProvisioningState + ScheduleProvisioningStatus: MachineLearningScheduleProvisioningStatus + ScriptReference: MachineLearningScriptReference + ScriptsToExecute: MachineLearningScriptsToExecute + ServiceDataAccessAuthIdentity: MachineLearningServiceDataAccessAuthIdentity + ShortSeriesHandlingConfiguration: MachineLearningShortSeriesHandlingConfiguration + SkuCapacity: MachineLearningSkuCapacity + SkuScaleType: MachineLearningSkuScaleType + SkuResource: MachineLearningSkuDetail + SkuSetting: MachineLearningSkuSetting + SslConfigStatus: MachineLearningSslConfigStatus + StackEnsembleSettings: MachineLearningStackEnsembleSettings + StackMetaLearnerType: MachineLearningStackMetaLearnerType + Status: MachineLearningWorkspaceQuotaStatus + StorageAccountType: MachineLearningStorageAccountType + SweepJob: MachineLearningSweepJob + TrainingSettings: MachineLearningTrainingSettings + TrainingSettings.enableDnnTraining: IsDnnTrainingEnabled + TrainingSettings.enableModelExplainability: IsModelExplainabilityEnabled + TrainingSettings.enableOnnxCompatibleModels: IsOnnxCompatibleModelsEnabled + TrainingSettings.enableStackEnsemble: IsStackEnsembleEnabled + TrainingSettings.enableVoteEnsemble: IsVoteEnsembleEnabled + UnderlyingResourceAction: MachineLearningUnderlyingResourceAction + UriFileDataVersion: MachineLearningUriFileDataVersion + UriFolderDataVersion: MachineLearningUriFolderDataVersion + UsageName: MachineLearningUsageName + UsageUnit: MachineLearningUsageUnit + UserAccountCredentials: MachineLearningUserAccountCredentials + UseStl: MachineLearningUseStl + ValueFormat: MachineLearningValueFormat + VirtualMachineSshCredentials: MachineLearningVmSshCredentials + VmPriority: MachineLearningVmPriority + WorkspaceConnectionUsernamePassword: MachineLearningWorkspaceConnectionUsernamePassword + Workspace.properties.hbiWorkspace: IsHbiWorkspace + Workspace.properties.publicNetworkAccess: PublicNetworkAccessType + WorkspaceUpdateParameters.properties.publicNetworkAccess: PublicNetworkAccessType + AllocationState: MachineLearningAllocationState + FeatureResource: MachineLearningFeatureResource + ResourceId.id: -|arm-id + JobBase.componentId: -|arm-id + JobBase.computeId: -|arm-id + CommandJob.environmentId: -|arm-id + EndpointComputeType.AzureMLCompute: AmlCompute + OutputPathAssetReference.jobId: -|arm-id + PipelineJob.sourceJobId: -|arm-id + VirtualMachineSize.premiumIO: IsPremiumIOSupported + AmlComputeNodeInformation.privateIpAddress: -|ip-address + AmlComputeNodeInformation.publicIpAddress: -|ip-address + CommandJob.codeId: -|arm-id + CodeConfiguration.codeId: -|arm-id + HDInsightProperties.address: -|ip-address + VirtualMachineSchemaProperties.address: -|ip-address + TrialComponent: MachineLearningTrialComponent + TrialComponent.codeId: -|arm-id + TrialComponent.environmentId: -|arm-id + Forecasting: MachineLearningForecasting + EndpointAuthToken.expiryTimeUtc: ExpireOn|unixtime # this temporarily does not work + EndpointAuthToken.refreshAfterTimeUtc: RefreshOn|unixtime # this temporarily does not work + SystemCreatedAcrAccount.armResourceId: ArmResourceIdentifier|arm-id + SystemCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id + UserCreatedAcrAccount.armResourceId: ArmResourceIdentifier|arm-id + UserCreatedStorageAccount.armResourceId: ArmResourceIdentifier|arm-id + Cron: ComputeStartStopCronSchedule + Recurrence: ComputeStartStopRecurrenceSchedule + EndpointServiceConnectionStatus: MachineLearningPrivateEndpointServiceConnectionStatus + ArmResourceId.resourceId: -|arm-id + Workspace.properties.hubResourceId: -|arm-id + OutboundRuleBasicResource: MachineLearningOutboundRuleBasic + OutboundRule: MachineLearningOutboundRule + BindOptions: MountBindOptions + BindOptions.createHostPath: DoesCreateHostPath + AcrDetails: RegistryAcrDetails + AllNodes: JobAllNodes + Nodes: JobNodes + AssetProvisioningState: RegistryAssetProvisioningState + BaseEnvironmentId: BaseEnvironmentType + BaseEnvironmentId.resourceId: -|arm-id + BlobReferenceForConsumptionDto.storageAccountArmId: -|arm-id + Collection: DataCollectionConfiguration + Docker: DockerSetting + Endpoint: ContainerEndpoint + Protocol: ContainerCommunicationProtocol + Image: ImageSetting + ConnectionCategory.AzureSqlDb: AzureSqlDB + ConnectionCategory.AzureMySqlDb: AzureMySqlDB + ConnectionCategory.AzurePostgresDb: AzurePostgresDB + EncryptionProperty.cosmosDbResourceId: CosmosDBResourceId|arm-id + EncryptionProperty.searchAccountResourceId: -|arm-id + EncryptionProperty.storageAccountResourceId: -|arm-id + MLAssistConfiguration: MachineLearningAssistConfiguration + MLAssistConfigurationEnabled: MachineLearningAssistEnabledConfiguration + MlflowAutologger: MachineLearningFlowAutoLogger + MLFlowAutologgerState: MachineLearningFlowAutoLoggerState + MultiSelect: LabelCategoryMultiSelect + PackageRequest: ModelPackageContent + PackageResponse: ModelPackageResult + PackageInputPathId.resourceId: -|arm-id + PrivateEndpointResource: RegistryPrivateEndpoint + PrivateEndpointResource.subnetArmId: -|arm-id + PrivateEndpoint: PrivateEndpointBase + PrivateEndpoint.id: -|arm-id + QueueSettings: JobQueueSettings + Ray: RayDistributionConfiguration + RegistryPrivateEndpointConnection.id: -|arm-id + RuleAction: NetworkingRuleAction + RuleCategory: OutboundRuleCategory + RuleStatus: OutboundRuleStatus + RuleType: OutboundRuleType + StatusMessage: JobStatusMessage + StatusMessageLevel: JobStatusMessageLevel + ImageType.azureml: AzureML + ProtectionLevel: IntellectualProtectionLevel + +directive: + - from: swagger-document + where: $.definitions.EndpointAuthToken.properties + transform: > + $["expiryTimeUtc"].format = "unixtime"; + $["refreshAfterTimeUtc"].format = "unixtime"; + - from: swagger-document + where: $.definitions.ComputeNodesInformation.properties + transform: delete $.nextLink; + reason: Duplicated "nextLink" property defined in schema 'AmlComputeNodesInformation' and 'ComputeNodesInformation' + - from: swagger-document + where: $.definitions.Compute.properties.provisioningErrors + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.subnet + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.errors + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.virtualMachineImage + transform: $["x-nullable"] = true; + #BUG: Patch does not return scaledown time PATCH + - from: swagger-document + where: $.definitions.ScaleSettings.properties.nodeIdleTimeBeforeScaleDown + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.currentNodeCount + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.VirtualMachineSchema.properties.properties.properties.administratorAccount + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.targetNodeCount + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.nodeStateCounts + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlCompute.allOf[?(@.type=="object")].properties.properties.properties.allocationState + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.EnvironmentContainerResource.properties.systemData + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.DatastoreProperties.properties.properties + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.ComputeInstance.allOf[?(@.type=="object")].properties.properties.properties.setupScripts + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlComputeProperties.properties.errors + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.AmlComputeProperties.properties.virtualMachineImage + transform: $["x-nullable"] = true; + - from: swagger-document + where: $.definitions.TableVerticalValidationDataSettings.properties.cvSplitColumnNames + transform: $["x-nullable"] = true; + - from: workspaceRP.json + where: $.definitions + transform: > + $.PrivateLinkResourceProperties.properties.groupId.readOnly = true; + $.PrivateLinkResourceProperties.properties.requiredMembers.readOnly = true; + # quite a few x-ms-client-name extensions are defined in the swagger, we here erase them all to prevent some funny interactions between our own renaming configuration + - from: mfe.json + where: $.definitions + transform: > + $.CodeContainerResource["x-ms-client-name"] = undefined; + $.CodeContainer["x-ms-client-name"] = undefined; + $.BatchDeploymentTrackedResource["x-ms-client-name"] = undefined; + $.BatchDeployment["x-ms-client-name"] = undefined; + $.BatchEndpointTrackedResource["x-ms-client-name"] = undefined; + $.BatchEndpoint["x-ms-client-name"] = undefined; + $.CodeVersionResource["x-ms-client-name"] = undefined; + $.CodeVersion["x-ms-client-name"] = undefined; + $.ComponentContainerResource["x-ms-client-name"] = undefined; + $.ComponentContainer["x-ms-client-name"] = undefined; + $.ComponentVersionResource["x-ms-client-name"] = undefined; + $.ComponentVersion["x-ms-client-name"] = undefined; + $.DataContainerResource["x-ms-client-name"] = undefined; + $.DataContainer["x-ms-client-name"] = undefined; + $.DatastoreResource["x-ms-client-name"] = undefined; + $.Datastore["x-ms-client-name"] = undefined; + $.DataVersionBaseResource["x-ms-client-name"] = undefined; + $.DataVersionBase["x-ms-client-name"] = undefined; + $.EnvironmentContainerResource["x-ms-client-name"] = undefined; + $.EnvironmentContainer["x-ms-client-name"] = undefined; + $.EnvironmentVersionResource["x-ms-client-name"] = undefined; + $.EnvironmentVersion["x-ms-client-name"] = undefined; + $.JobBaseResource["x-ms-client-name"] = undefined; + $.JobBase["x-ms-client-name"] = undefined; + $.ModelContainerResource["x-ms-client-name"] = undefined; + $.ModelContainer["x-ms-client-name"] = undefined; + $.ModelVersionResource["x-ms-client-name"] = undefined; + $.ModelVersion["x-ms-client-name"] = undefined; + $.OnlineDeploymentTrackedResource["x-ms-client-name"] = undefined; + $.OnlineDeployment["x-ms-client-name"] = undefined; + $.OnlineEndpointTrackedResource["x-ms-client-name"] = undefined; + $.OnlineEndpoint["x-ms-client-name"] = undefined; +``` diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json new file mode 100644 index 0000000000..ee4d896607 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/resources.json @@ -0,0 +1,3472 @@ +{ + "Resources": { + "MachineLearningCompute": { + "Name": "MachineLearningCompute", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "GET", + "OperationID": "Compute_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use \u0027keys\u0027 nested resource to get them." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "PUT", + "OperationID": "Compute_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "PATCH", + "OperationID": "Compute_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}", + "Method": "DELETE", + "OperationID": "Compute_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes specified Machine Learning compute." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes", + "Method": "GET", + "OperationID": "Compute_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Gets computes in specified workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "UpdateCustomServices", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/customServices", + "Method": "POST", + "OperationID": "Compute_UpdateCustomServices", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the custom services list. The list of custom services provided shall be overwritten" + }, + { + "Name": "GetNodes", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listNodes", + "Method": "POST", + "OperationID": "Compute_ListNodes", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListNodes", + "NextPageMethod": "ListNodesNextPage", + "ItemName": "nodes", + "NextLinkName": "nextLink" + }, + "Description": "Get the details (e.g IP address, port etc) of all the compute nodes in the compute." + }, + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/listKeys", + "Method": "POST", + "OperationID": "Compute_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets secrets related to Machine Learning compute (storage keys, service credentials, etc)." + }, + { + "Name": "Start", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/start", + "Method": "POST", + "OperationID": "Compute_Start", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Posts a start action to a compute instance" + }, + { + "Name": "Stop", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/stop", + "Method": "POST", + "OperationID": "Compute_Stop", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Posts a stop action to a compute instance" + }, + { + "Name": "Restart", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/restart", + "Method": "POST", + "OperationID": "Compute_Restart", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Posts a restart action to a compute instance" + }, + { + "Name": "UpdateIdleShutdownSetting", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/computes/{computeName}/updateIdleShutdownSetting", + "Method": "POST", + "OperationID": "Compute_UpdateIdleShutdownSetting", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates the idle shutdown setting of a compute instance." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "ComputeResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/computes", + "ResourceKey": "computeName", + "ResourceKeySegment": "computes", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryCodeContainer": { + "Name": "MachineLearningRegistryCodeContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "GET", + "OperationID": "RegistryCodeContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Code container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "PUT", + "OperationID": "RegistryCodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Code container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "PUT", + "OperationID": "RegistryCodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Code container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}", + "Method": "DELETE", + "OperationID": "RegistryCodeContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Code container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes", + "Method": "GET", + "OperationID": "RegistryCodeContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "CodeContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/codes", + "ResourceKey": "codeName", + "ResourceKeySegment": "codes", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningCodeContainer": { + "Name": "MachineLearningCodeContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "GET", + "OperationID": "CodeContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "PUT", + "OperationID": "CodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "PUT", + "OperationID": "CodeContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}", + "Method": "DELETE", + "OperationID": "CodeContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes", + "Method": "GET", + "OperationID": "CodeContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "CodeContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/codes", + "ResourceKey": "name", + "ResourceKeySegment": "codes", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryCodeVersion": { + "Name": "MachineLearningRegistryCodeVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryCodeVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryCodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryCodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryCodeVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions", + "Method": "GET", + "OperationID": "RegistryCodeVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/codes/{codeName}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "RegistryCodeVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a code asset to." + } + ], + "Parents": ["MachineLearningRegistryCodeContainer"], + "SwaggerModelName": "CodeVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/codes/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningCodeVersion": { + "Name": "MachineLearningCodeVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "GET", + "OperationID": "CodeVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "CodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "CodeVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "CodeVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions", + "Method": "GET", + "OperationID": "CodeVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "CodeVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a code asset to." + } + ], + "Parents": ["MachineLearningCodeContainer"], + "SwaggerModelName": "CodeVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/codes/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearninRegistryComponentContainer": { + "Name": "MachineLearninRegistryComponentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "GET", + "OperationID": "RegistryComponentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "PUT", + "OperationID": "RegistryComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "PUT", + "OperationID": "RegistryComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}", + "Method": "DELETE", + "OperationID": "RegistryComponentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components", + "Method": "GET", + "OperationID": "RegistryComponentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "ComponentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/components", + "ResourceKey": "componentName", + "ResourceKeySegment": "components", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningComponentContainer": { + "Name": "MachineLearningComponentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "GET", + "OperationID": "ComponentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "PUT", + "OperationID": "ComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "PUT", + "OperationID": "ComponentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}", + "Method": "DELETE", + "OperationID": "ComponentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components", + "Method": "GET", + "OperationID": "ComponentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List component containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "ComponentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/components", + "ResourceKey": "name", + "ResourceKeySegment": "components", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearninRegistryComponentVersion": { + "Name": "MachineLearninRegistryComponentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryComponentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryComponentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/components/{componentName}/versions", + "Method": "GET", + "OperationID": "RegistryComponentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearninRegistryComponentContainer"], + "SwaggerModelName": "ComponentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/components/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningComponentVersion": { + "Name": "MachineLearningComponentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "GET", + "OperationID": "ComponentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ComponentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "ComponentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions", + "Method": "GET", + "OperationID": "ComponentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List component versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningComponentContainer"], + "SwaggerModelName": "ComponentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/components/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryDataContainer": { + "Name": "MachineLearningRegistryDataContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "GET", + "OperationID": "RegistryDataContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "PUT", + "OperationID": "RegistryDataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "PUT", + "OperationID": "RegistryDataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}", + "Method": "DELETE", + "OperationID": "RegistryDataContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data", + "Method": "GET", + "OperationID": "RegistryDataContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Data containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "DataContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/data", + "ResourceKey": "name", + "ResourceKeySegment": "data", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningDataContainer": { + "Name": "MachineLearningDataContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "GET", + "OperationID": "DataContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "PUT", + "OperationID": "DataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "PUT", + "OperationID": "DataContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}", + "Method": "DELETE", + "OperationID": "DataContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data", + "Method": "GET", + "OperationID": "DataContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "DataContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/data", + "ResourceKey": "name", + "ResourceKeySegment": "data", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryDataVersion": { + "Name": "MachineLearningRegistryDataVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryDataVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryDataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryDataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryDataVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions", + "Method": "GET", + "OperationID": "RegistryDataVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data versions in the data container" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/data/{name}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "RegistryDataVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a data asset to." + } + ], + "Parents": ["MachineLearningRegistryDataContainer"], + "SwaggerModelName": "DataVersionBaseResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/data/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningDataVersion": { + "Name": "MachineLearningDataVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "GET", + "OperationID": "DataVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "DataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "DataVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "DataVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions", + "Method": "GET", + "OperationID": "DataVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List data versions in the data container" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningDataContainer"], + "SwaggerModelName": "DataVersionBaseResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/data/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryEnvironmentContainer": { + "Name": "MachineLearningRegistryEnvironmentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "GET", + "OperationID": "RegistryEnvironmentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}", + "Method": "DELETE", + "OperationID": "RegistryEnvironmentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments", + "Method": "GET", + "OperationID": "RegistryEnvironmentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List environment containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "EnvironmentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/environments", + "ResourceKey": "environmentName", + "ResourceKeySegment": "environments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningEnvironmentContainer": { + "Name": "MachineLearningEnvironmentContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "GET", + "OperationID": "EnvironmentContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "PUT", + "OperationID": "EnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "PUT", + "OperationID": "EnvironmentContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}", + "Method": "DELETE", + "OperationID": "EnvironmentContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments", + "Method": "GET", + "OperationID": "EnvironmentContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List environment containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "EnvironmentContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/environments", + "ResourceKey": "name", + "ResourceKeySegment": "environments", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryEnvironmentVersion": { + "Name": "MachineLearningRegistryEnvironmentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryEnvironmentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryEnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryEnvironmentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/environments/{environmentName}/versions", + "Method": "GET", + "OperationID": "RegistryEnvironmentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistryEnvironmentContainer"], + "SwaggerModelName": "EnvironmentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/environments/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningEnvironmentVersion": { + "Name": "MachineLearningEnvironmentVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "GET", + "OperationID": "EnvironmentVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "EnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an EnvironmentVersion." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "EnvironmentVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an EnvironmentVersion." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "EnvironmentVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions", + "Method": "GET", + "OperationID": "EnvironmentVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningEnvironmentContainer"], + "SwaggerModelName": "EnvironmentVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/environments/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryModelContainer": { + "Name": "MachineLearningRegistryModelContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "GET", + "OperationID": "RegistryModelContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "PUT", + "OperationID": "RegistryModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update model container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "PUT", + "OperationID": "RegistryModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update model container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}", + "Method": "DELETE", + "OperationID": "RegistryModelContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models", + "Method": "GET", + "OperationID": "RegistryModelContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List model containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningRegistry"], + "SwaggerModelName": "ModelContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/models", + "ResourceKey": "modelName", + "ResourceKeySegment": "models", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningModelContainer": { + "Name": "MachineLearningModelContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "GET", + "OperationID": "ModelContainers_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "PUT", + "OperationID": "ModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "PUT", + "OperationID": "ModelContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}", + "Method": "DELETE", + "OperationID": "ModelContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models", + "Method": "GET", + "OperationID": "ModelContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List model containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "ModelContainerResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/models", + "ResourceKey": "name", + "ResourceKeySegment": "models", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistryModelVersion": { + "Name": "MachineLearningRegistryModelVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "GET", + "OperationID": "RegistryModelVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "PUT", + "OperationID": "RegistryModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}", + "Method": "DELETE", + "OperationID": "RegistryModelVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions", + "Method": "GET", + "OperationID": "RegistryModelVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Package", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/package", + "Method": "POST", + "OperationID": "RegistryModelVersions_Package", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Model Version Package operation." + }, + { + "Name": "CreateOrGetStartPendingUpload", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/models/{modelName}/versions/{version}/startPendingUpload", + "Method": "POST", + "OperationID": "RegistryModelVersions_CreateOrGetStartPendingUpload", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Generate a storage location and credential for the client to upload a model asset to." + } + ], + "Parents": ["MachineLearningRegistryModelContainer"], + "SwaggerModelName": "ModelVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/registries/models/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningModelVersion": { + "Name": "MachineLearningModelVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "GET", + "OperationID": "ModelVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "ModelVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "ModelVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions", + "Method": "GET", + "OperationID": "ModelVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List model versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Package", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package", + "Method": "POST", + "OperationID": "ModelVersions_Package", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Model Version Package operation." + } + ], + "Parents": ["MachineLearningModelContainer"], + "SwaggerModelName": "ModelVersionResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/models/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningBatchEndpoint": { + "Name": "MachineLearningBatchEndpoint", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "GET", + "OperationID": "BatchEndpoints_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a batch inference endpoint by name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "PUT", + "OperationID": "BatchEndpoints_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates a batch inference endpoint (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "PATCH", + "OperationID": "BatchEndpoints_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a batch inference endpoint (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}", + "Method": "DELETE", + "OperationID": "BatchEndpoints_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Batch Inference Endpoint (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints", + "Method": "GET", + "OperationID": "BatchEndpoints_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists Batch inference endpoint in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/listkeys", + "Method": "POST", + "OperationID": "BatchEndpoints_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists batch Inference Endpoint keys." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "BatchEndpointTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/batchEndpoints", + "ResourceKey": "endpointName", + "ResourceKeySegment": "batchEndpoints", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningBatchDeployment": { + "Name": "MachineLearningBatchDeployment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "GET", + "OperationID": "BatchDeployments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a batch inference deployment by id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PUT", + "OperationID": "BatchDeployments_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates/updates a batch inference deployment (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PATCH", + "OperationID": "BatchDeployments_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update a batch inference deployment (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "DELETE", + "OperationID": "BatchDeployments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Batch Inference deployment (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/batchEndpoints/{endpointName}/deployments", + "Method": "GET", + "OperationID": "BatchDeployments_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists Batch inference deployments in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningBatchEndpoint"], + "SwaggerModelName": "BatchDeploymentTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/batchEndpoints/deployments", + "ResourceKey": "deploymentName", + "ResourceKeySegment": "deployments", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningDatastore": { + "Name": "MachineLearningDatastore", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "GET", + "OperationID": "Datastores_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get datastore." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "PUT", + "OperationID": "Datastores_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update datastore." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "PUT", + "OperationID": "Datastores_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update datastore." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}", + "Method": "DELETE", + "OperationID": "Datastores_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete datastore." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores", + "Method": "GET", + "OperationID": "Datastores_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List datastores." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}/listSecrets", + "Method": "POST", + "OperationID": "Datastores_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get datastore secrets." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "DatastoreResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/datastores", + "ResourceKey": "name", + "ResourceKeySegment": "datastores", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeatureSetContainer": { + "Name": "MachineLearningFeatureSetContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "GET", + "OperationID": "FeaturesetContainers_GetEntity", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "PUT", + "OperationID": "FeaturesetContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "PUT", + "OperationID": "FeaturesetContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}", + "Method": "DELETE", + "OperationID": "FeaturesetContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets", + "Method": "GET", + "OperationID": "FeaturesetContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List featurestore entity containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "FeaturesetContainer", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featuresets", + "ResourceKey": "name", + "ResourceKeySegment": "featuresets", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeature": { + "Name": "MachineLearningFeature", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features/{featureName}", + "Method": "GET", + "OperationID": "Features_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get feature." + } + ], + "CreateOperations": [], + "UpdateOperations": [], + "DeleteOperations": [], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{featuresetName}/versions/{featuresetVersion}/features", + "Method": "GET", + "OperationID": "Features_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Features." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningFeatureSetVersion"], + "SwaggerModelName": "Feature", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featuresets/versions/features", + "ResourceKey": "featureName", + "ResourceKeySegment": "features", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeatureSetVersion": { + "Name": "MachineLearningFeatureSetVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "GET", + "OperationID": "FeaturesetVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturesetVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturesetVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "FeaturesetVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions", + "Method": "GET", + "OperationID": "FeaturesetVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Backfill", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/backfill", + "Method": "POST", + "OperationID": "FeaturesetVersions_Backfill", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Backfill." + }, + { + "Name": "GetMaterializationJobs", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featuresets/{name}/versions/{version}/listMaterializationJobs", + "Method": "POST", + "OperationID": "FeaturesetVersions_ListMaterializationJobs", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListMaterializationJobs", + "NextPageMethod": "ListMaterializationJobsNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List materialization Jobs." + } + ], + "Parents": ["MachineLearningFeatureSetContainer"], + "SwaggerModelName": "FeaturesetVersion", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featuresets/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeatureStoreEntityContainer": { + "Name": "MachineLearningFeatureStoreEntityContainer", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "GET", + "OperationID": "FeaturestoreEntityContainers_GetEntity", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get container." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityContainers_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update container." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}", + "Method": "DELETE", + "OperationID": "FeaturestoreEntityContainers_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete container." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities", + "Method": "GET", + "OperationID": "FeaturestoreEntityContainers_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List featurestore entity containers." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "FeaturestoreEntityContainer", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featurestoreEntities", + "ResourceKey": "name", + "ResourceKeySegment": "featurestoreEntities", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningFeaturestoreEntityVersion": { + "Name": "MachineLearningFeaturestoreEntityVersion", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "GET", + "OperationID": "FeaturestoreEntityVersions_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get version." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "PUT", + "OperationID": "FeaturestoreEntityVersions_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update version." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions/{version}", + "Method": "DELETE", + "OperationID": "FeaturestoreEntityVersions_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete version." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/featurestoreEntities/{name}/versions", + "Method": "GET", + "OperationID": "FeaturestoreEntityVersions_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List versions." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningFeatureStoreEntityContainer"], + "SwaggerModelName": "FeaturestoreEntityVersion", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/featurestoreEntities/versions", + "ResourceKey": "version", + "ResourceKeySegment": "versions", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningJob": { + "Name": "MachineLearningJob", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "GET", + "OperationID": "Jobs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a Job by name/id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "PUT", + "OperationID": "Jobs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates and executes a Job." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "PATCH", + "OperationID": "Jobs_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Updates a Job." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}", + "Method": "DELETE", + "OperationID": "Jobs_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a Job (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs", + "Method": "GET", + "OperationID": "Jobs_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists Jobs in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "Cancel", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}/cancel", + "Method": "POST", + "OperationID": "Jobs_Cancel", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Cancels a Job (asynchronous)." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "JobBaseResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/jobs", + "ResourceKey": "id", + "ResourceKeySegment": "jobs", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningLabelingJob": { + "Name": "MachineLearningLabelingJob", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "GET", + "OperationID": "LabelingJobs_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets a labeling job by name/id." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "PUT", + "OperationID": "LabelingJobs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a labeling job (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "PUT", + "OperationID": "LabelingJobs_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a labeling job (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}", + "Method": "DELETE", + "OperationID": "LabelingJobs_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete a labeling job." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs", + "Method": "GET", + "OperationID": "LabelingJobs_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists labeling jobs in the workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "ExportLabels", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/exportLabels", + "Method": "POST", + "OperationID": "LabelingJobs_ExportLabels", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Export labels from a labeling job (asynchronous)." + }, + { + "Name": "Pause", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/pause", + "Method": "POST", + "OperationID": "LabelingJobs_Pause", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Pause a labeling job." + }, + { + "Name": "Resume", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/labelingJobs/{id}/resume", + "Method": "POST", + "OperationID": "LabelingJobs_Resume", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Resume a labeling job (asynchronous)." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "LabelingJob", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "ResourceKey": "id", + "ResourceKeySegment": "labelingJobs", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningOnlineEndpoint": { + "Name": "MachineLearningOnlineEndpoint", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "GET", + "OperationID": "OnlineEndpoints_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Online Endpoint." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "PUT", + "OperationID": "OnlineEndpoints_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Online Endpoint (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "PATCH", + "OperationID": "OnlineEndpoints_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update Online Endpoint (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}", + "Method": "DELETE", + "OperationID": "OnlineEndpoints_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Online Endpoint (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints", + "Method": "GET", + "OperationID": "OnlineEndpoints_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Online Endpoints." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/listKeys", + "Method": "POST", + "OperationID": "OnlineEndpoints_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List EndpointAuthKeys for an Endpoint using Key-based authentication." + }, + { + "Name": "RegenerateKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/regenerateKeys", + "Method": "POST", + "OperationID": "OnlineEndpoints_RegenerateKeys", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous)." + }, + { + "Name": "GetToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/token", + "Method": "POST", + "OperationID": "OnlineEndpoints_GetToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Retrieve a valid AML token for an Endpoint using AMLToken-based authentication." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "OnlineEndpointTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/onlineEndpoints", + "ResourceKey": "endpointName", + "ResourceKeySegment": "onlineEndpoints", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningOnlineDeployment": { + "Name": "MachineLearningOnlineDeployment", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "GET", + "OperationID": "OnlineDeployments_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Inference Deployment Deployment." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PUT", + "OperationID": "OnlineDeployments_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update Inference Endpoint Deployment (asynchronous)." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "PATCH", + "OperationID": "OnlineDeployments_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Update Online Deployment (asynchronous)." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}", + "Method": "DELETE", + "OperationID": "OnlineDeployments_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete Inference Endpoint Deployment (asynchronous)." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments", + "Method": "GET", + "OperationID": "OnlineDeployments_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Inference Endpoint Deployments." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetLogs", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/getLogs", + "Method": "POST", + "OperationID": "OnlineDeployments_GetLogs", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Polls an Endpoint operation." + }, + { + "Name": "GetSkus", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus", + "Method": "GET", + "OperationID": "OnlineDeployments_ListSkus", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListSkus", + "NextPageMethod": "ListSkusNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List Inference Endpoint Deployment Skus." + } + ], + "Parents": ["MachineLearningOnlineEndpoint"], + "SwaggerModelName": "OnlineDeploymentTrackedResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/onlineEndpoints/deployments", + "ResourceKey": "deploymentName", + "ResourceKeySegment": "deployments", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningSchedule": { + "Name": "MachineLearningSchedule", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "GET", + "OperationID": "Schedules_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get schedule." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "PUT", + "OperationID": "Schedules_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update schedule." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "PUT", + "OperationID": "Schedules_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update schedule." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules/{name}", + "Method": "DELETE", + "OperationID": "Schedules_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete schedule." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/schedules", + "Method": "GET", + "OperationID": "Schedules_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List schedules in specified workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "Schedule", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/schedules", + "ResourceKey": "name", + "ResourceKeySegment": "schedules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningRegistry": { + "Name": "MachineLearningRegistry", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "GET", + "OperationID": "Registries_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get registry" + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "PUT", + "OperationID": "Registries_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update registry" + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "PATCH", + "OperationID": "Registries_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update tags" + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}", + "Method": "DELETE", + "OperationID": "Registries_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete registry" + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries", + "Method": "GET", + "OperationID": "Registries_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List registries" + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetMachineLearningRegistries", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/registries", + "Method": "GET", + "OperationID": "Registries_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "List registries by subscription" + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "RemoveRegions", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/registries/{registryName}/removeRegions", + "Method": "POST", + "OperationID": "Registries_RemoveRegions", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Remove regions from registry" + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Registry", + "ResourceType": "Microsoft.MachineLearningServices/registries", + "ResourceKey": "registryName", + "ResourceKeySegment": "registries", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningWorkspace": { + "Name": "MachineLearningWorkspace", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "GET", + "OperationID": "Workspaces_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets the properties of the specified machine learning workspace." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "PUT", + "OperationID": "Workspaces_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates a workspace with the specified parameters." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "PATCH", + "OperationID": "Workspaces_Update", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Updates a machine learning workspace with the specified parameters." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}", + "Method": "DELETE", + "OperationID": "Workspaces_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes a machine learning workspace." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces", + "Method": "GET", + "OperationID": "Workspaces_ListByResourceGroup", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListByResourceGroup", + "NextPageMethod": "ListByResourceGroupNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the available machine learning workspaces under the specified resource group." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [ + { + "Name": "GetMachineLearningWorkspaces", + "Path": "/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/workspaces", + "Method": "GET", + "OperationID": "Workspaces_ListBySubscription", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListBySubscription", + "NextPageMethod": "ListBySubscriptionNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the available machine learning workspaces under the specified subscription." + } + ], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetWorkspaceFeatures", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features", + "Method": "GET", + "OperationID": "WorkspaceFeatures_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all enabled features for a workspace" + }, + { + "Name": "Diagnose", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/diagnose", + "Method": "POST", + "OperationID": "Workspaces_Diagnose", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Diagnose workspace setup issue." + }, + { + "Name": "GetKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listKeys", + "Method": "POST", + "OperationID": "Workspaces_ListKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry." + }, + { + "Name": "GetNotebookAccessToken", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookAccessToken", + "Method": "POST", + "OperationID": "Workspaces_ListNotebookAccessToken", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Get Azure Machine Learning Workspace notebook access token" + }, + { + "Name": "GetNotebookKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listNotebookKeys", + "Method": "POST", + "OperationID": "Workspaces_ListNotebookKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists keys of Azure Machine Learning Workspaces notebook." + }, + { + "Name": "GetStorageAccountKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/listStorageAccountKeys", + "Method": "POST", + "OperationID": "Workspaces_ListStorageAccountKeys", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists keys of Azure Machine Learning Workspace\u0027s storage account." + }, + { + "Name": "GetOutboundNetworkDependenciesEndpoints", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints", + "Method": "GET", + "OperationID": "Workspaces_ListOutboundNetworkDependenciesEndpoints", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "ListOutboundNetworkDependenciesEndpoints", + "NextPageMethod": null, + "ItemName": "value", + "NextLinkName": null + }, + "Description": "Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically." + }, + { + "Name": "PrepareNotebook", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/prepareNotebook", + "Method": "POST", + "OperationID": "Workspaces_PrepareNotebook", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Prepare Azure Machine Learning Workspace\u0027s notebook resource" + }, + { + "Name": "ResyncKeys", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/resyncKeys", + "Method": "POST", + "OperationID": "Workspaces_ResyncKeys", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry" + }, + { + "Name": "GetPrivateLinkResources", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources", + "Method": "GET", + "OperationID": "PrivateLinkResources_List", + "IsLongRunning": false, + "PagingMetadata": { "Method": "List", "NextPageMethod": null, "ItemName": "value", "NextLinkName": null }, + "Description": "Called by Client (Portal, CLI, etc) to get available \u0022private link resources\u0022 for the workspace.\r\nEach \u0022private link resource\u0022 is a connection endpoint (IP address) to the resource.\r\nPre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution.\r\nOther RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc.\r\nDefined in the \u0022[NRP] Private Endpoint Design\u0022 doc, topic \u0022GET API for GroupIds\u0022." + }, + { + "Name": "ProvisionManagedNetworkManagedNetworkProvision", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/provisionManagedNetwork", + "Method": "POST", + "OperationID": "ManagedNetworkProvisions_ProvisionManagedNetwork", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Provisions the managed network of a machine learning workspace." + } + ], + "Parents": ["ResourceGroupResource"], + "SwaggerModelName": "Workspace", + "ResourceType": "Microsoft.MachineLearningServices/workspaces", + "ResourceKey": "workspaceName", + "ResourceKeySegment": "workspaces", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningWorkspaceConnection": { + "Name": "MachineLearningWorkspaceConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "GET", + "OperationID": "WorkspaceConnections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Lists machine learning workspaces connections by name." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "PUT", + "OperationID": "WorkspaceConnections_Create", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Create or update machine learning workspaces connections under the specified workspace." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "PATCH", + "OperationID": "WorkspaceConnections_Update", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Update machine learning workspaces connections under the specified workspace." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}", + "Method": "DELETE", + "OperationID": "WorkspaceConnections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Delete machine learning workspaces connections by name." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections", + "Method": "GET", + "OperationID": "WorkspaceConnections_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists all the available machine learning workspaces connections under the specified workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [ + { + "Name": "GetSecrets", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/connections/{connectionName}/listsecrets", + "Method": "POST", + "OperationID": "WorkspaceConnections_ListSecrets", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "List all the secrets of a machine learning workspaces connections." + } + ], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "WorkspaceConnectionPropertiesV2BasicResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/connections", + "ResourceKey": "connectionName", + "ResourceKeySegment": "connections", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningOutboundRuleBasic": { + "Name": "MachineLearningOutboundRuleBasic", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "GET", + "OperationID": "ManagedNetworkSettingsRule_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Gets an outbound rule from the managed network of a machine learning workspace." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "PUT", + "OperationID": "ManagedNetworkSettingsRule_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an outbound rule in the managed network of a machine learning workspace." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "PUT", + "OperationID": "ManagedNetworkSettingsRule_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Creates or updates an outbound rule in the managed network of a machine learning workspace." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules/{ruleName}", + "Method": "DELETE", + "OperationID": "ManagedNetworkSettingsRule_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Deletes an outbound rule from the managed network of a machine learning workspace." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundRules", + "Method": "GET", + "OperationID": "ManagedNetworkSettingsRule_List", + "IsLongRunning": false, + "PagingMetadata": { + "Method": "List", + "NextPageMethod": "ListNextPage", + "ItemName": "value", + "NextLinkName": "nextLink" + }, + "Description": "Lists the managed network outbound rules for a machine learning workspace." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "OutboundRuleBasicResource", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/outboundRules", + "ResourceKey": "ruleName", + "ResourceKeySegment": "outboundRules", + "IsTrackedResource": false, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + }, + "MachineLearningPrivateEndpointConnection": { + "Name": "MachineLearningPrivateEndpointConnection", + "GetOperations": [ + { + "Name": "Get", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_Get", + "IsLongRunning": false, + "PagingMetadata": null, + "Description": "Called by end-users to get a PE connection." + } + ], + "CreateOperations": [ + { + "Name": "CreateOrUpdate", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Called by end-users to approve or reject a PE connection.\r\nThis method must validate and forward the call to NRP." + } + ], + "UpdateOperations": [ + { + "Name": "Update", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "PUT", + "OperationID": "PrivateEndpointConnections_CreateOrUpdate", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Called by end-users to approve or reject a PE connection.\r\nThis method must validate and forward the call to NRP." + } + ], + "DeleteOperations": [ + { + "Name": "Delete", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + "Method": "DELETE", + "OperationID": "PrivateEndpointConnections_Delete", + "IsLongRunning": true, + "PagingMetadata": null, + "Description": "Called by end-users to delete a PE connection." + } + ], + "ListOperations": [ + { + "Name": "GetAll", + "Path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateEndpointConnections", + "Method": "GET", + "OperationID": "PrivateEndpointConnections_List", + "IsLongRunning": false, + "PagingMetadata": { "Method": "List", "NextPageMethod": null, "ItemName": "value", "NextLinkName": null }, + "Description": "Called by end-users to get all PE connections." + } + ], + "OperationsFromResourceGroupExtension": [], + "OperationsFromSubscriptionExtension": [], + "OperationsFromManagementGroupExtension": [], + "OperationsFromTenantExtension": [], + "OtherOperations": [], + "Parents": ["MachineLearningWorkspace"], + "SwaggerModelName": "PrivateEndpointConnection", + "ResourceType": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "ResourceKey": "privateEndpointConnectionName", + "ResourceKeySegment": "privateEndpointConnections", + "IsTrackedResource": true, + "IsTenantResource": false, + "IsSubscriptionResource": false, + "IsManagementGroupResource": false, + "IsExtensionResource": false, + "IsSingletonResource": false + } + } +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp new file mode 100644 index 0000000000..3a172ce406 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchDeploymentTrackedResource.tsp @@ -0,0 +1,79 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./BatchEndpointTrackedResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(BatchEndpointTrackedResource) +model BatchDeploymentTrackedResource is TrackedResource { + @doc("The identifier for the Batch deployments.") + @path + @key("deploymentName") + @segment("deployments") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface BatchDeploymentTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a batch inference deployment by id.") + @operationId("BatchDeployments_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates/updates a batch inference deployment (asynchronous).") + @operationId("BatchDeployments_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update a batch inference deployment (asynchronous).") + @operationId("BatchDeployments_Update") + update is ArmCustomPatchAsync< + BatchDeploymentTrackedResource, + PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Batch Inference deployment (asynchronous).") + @operationId("BatchDeployments_Delete") + delete is ArmResourceDeleteAsync< + BatchDeploymentTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists Batch inference deployments in the workspace.") + @operationId("BatchDeployments_List") + list is ArmResourceListByParent< + BatchDeploymentTrackedResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Top of list.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp new file mode 100644 index 0000000000..423f98e30b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/BatchEndpointTrackedResource.tsp @@ -0,0 +1,84 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(Workspace) +model BatchEndpointTrackedResource is TrackedResource { + @doc("Name for the Batch Endpoint.") + @path + @key("endpointName") + @segment("batchEndpoints") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface BatchEndpointTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a batch inference endpoint by name.") + @operationId("BatchEndpoints_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates a batch inference endpoint (asynchronous).") + @operationId("BatchEndpoints_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update a batch inference endpoint (asynchronous).") + @operationId("BatchEndpoints_Update") + update is ArmCustomPatchAsync< + BatchEndpointTrackedResource, + PartialMinimalTrackedResourceWithIdentity + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Batch Inference Endpoint (asynchronous).") + @operationId("BatchEndpoints_Delete") + delete is ArmResourceDeleteAsync< + BatchEndpointTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists Batch inference endpoint in the workspace.") + @operationId("BatchEndpoints_List") + list is ArmResourceListByParent< + BatchEndpointTrackedResource, + { + ...BaseParameters; + + @doc("Number of endpoints to be retrieved in a page of results.") + @query("count") + count?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists batch Inference Endpoint keys.") + @operationId("BatchEndpoints_ListKeys") + listKeys is ArmResourceActionSync< + BatchEndpointTrackedResource, + void, + EndpointAuthKeys + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp new file mode 100644 index 0000000000..d08bf377ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeContainerResource.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model CodeContainerResource is ProxyResource { + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("codeName") + @segment("codes") + name: string; +} + +@armResourceOperations +interface CodeContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get Code container.") + @operationId("RegistryCodeContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update Code container.") + @operationId("RegistryCodeContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Code container.") + @operationId("RegistryCodeContainers_Delete") + delete is ArmResourceDeleteAsync< + CodeContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List containers.") + @operationId("RegistryCodeContainers_List") + list is ArmResourceListByParent< + CodeContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp new file mode 100644 index 0000000000..fa1245c953 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/CodeVersionResource.tsp @@ -0,0 +1,76 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./CodeContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(CodeContainerResource) +model CodeVersionResource is ProxyResource { + @doc("Version identifier.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface CodeVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryCodeVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryCodeVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryCodeVersions_Delete") + delete is ArmResourceDeleteAsync< + CodeVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryCodeVersions_List") + list is ArmResourceListByParent< + CodeVersionResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Generate a storage location and credential for the client to upload a code asset to.") + @operationId("RegistryCodeVersions_CreateOrGetStartPendingUpload") + createOrGetStartPendingUpload is ArmResourceActionSync< + CodeVersionResource, + PendingUploadRequestDto, + PendingUploadResponseDto + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp new file mode 100644 index 0000000000..36164c6aec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentContainerResource.tsp @@ -0,0 +1,60 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model ComponentContainerResource is ProxyResource { + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("componentName") + @segment("components") + name: string; +} + +@armResourceOperations +interface ComponentContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryComponentContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update container.") + @operationId("RegistryComponentContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryComponentContainers_Delete") + delete is ArmResourceDeleteAsync< + ComponentContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List containers.") + @operationId("RegistryComponentContainers_List") + list is ArmResourceListByParent< + ComponentContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp new file mode 100644 index 0000000000..a96638c436 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComponentVersionResource.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ComponentContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(ComponentContainerResource) +model ComponentVersionResource is ProxyResource { + @doc("Version identifier.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface ComponentVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryComponentVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryComponentVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryComponentVersions_Delete") + delete is ArmResourceDeleteAsync< + ComponentVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryComponentVersions_List") + list is ArmResourceListByParent< + ComponentVersionResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Component stage.") + @query("stage") + stage?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp new file mode 100644 index 0000000000..389dc49412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ComputeResource.tsp @@ -0,0 +1,120 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +// FIXME: ComputeResource has no properties property +@doc("Machine Learning compute object wrapped into ARM resource envelope.") +@parentResource(Workspace) +model ComputeResource is TrackedResource<{}> { + @doc("Name of the Azure Machine Learning compute.") + @path + @key("computeName") + @segment("computes") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface ComputeResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets compute definition by its name. Any secrets (storage keys, service credentials, etc) are not returned - use 'keys' nested resource to get them.") + @operationId("Compute_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation. If your intent is to create a new compute, do a GET first to verify that it does not exist yet.") + @operationId("Compute_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates properties of a compute. This call will overwrite a compute if it exists. This is a nonrecoverable operation.") + @operationId("Compute_Update") + update is ArmCustomPatchAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes specified Machine Learning compute.") + @operationId("Compute_Delete") + delete is ArmResourceDeleteAsync< + ComputeResource, + { + ...BaseParameters; + + @doc("Delete the underlying compute if 'Delete', or detach the underlying compute from workspace if 'Detach'.") + @query("underlyingResourceAction") + underlyingResourceAction: UnderlyingResourceAction; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets computes in specified workspace.") + @operationId("Compute_List") + list is ArmResourceListByParent< + ComputeResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates the custom services list. The list of custom services provided shall be overwritten") + @operationId("Compute_UpdateCustomServices") + updateCustomServices is ArmResourceActionSync< + ComputeResource, + CustomService[], + void + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get the details (e.g IP address, port etc) of all the compute nodes in the compute.") + @operationId("Compute_ListNodes") + listNodes is ArmResourceActionSync< + ComputeResource, + void, + AmlComputeNodesInformation + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets secrets related to Machine Learning compute (storage keys, service credentials, etc).") + @operationId("Compute_ListKeys") + listKeys is ArmResourceActionSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Posts a start action to a compute instance") + @operationId("Compute_Start") + start is ArmResourceActionNoResponseContentAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Posts a stop action to a compute instance") + @operationId("Compute_Stop") + stop is ArmResourceActionNoResponseContentAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Posts a restart action to a compute instance") + @operationId("Compute_Restart") + restart is ArmResourceActionNoResponseContentAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates the idle shutdown setting of a compute instance.") + @operationId("Compute_UpdateIdleShutdownSetting") + updateIdleShutdownSetting is ArmResourceActionSync< + ComputeResource, + IdleShutdownSetting, + void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp new file mode 100644 index 0000000000..7cad46b631 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataContainerResource.tsp @@ -0,0 +1,63 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model DataContainerResource is ProxyResource { + @doc("Container name.") + @path + @key("name") + @segment("data") + name: string; +} + +@armResourceOperations +interface DataContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryDataContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update container.") + @operationId("RegistryDataContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryDataContainers_Delete") + delete is ArmResourceDeleteAsync< + DataContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List Data containers.") + @operationId("RegistryDataContainers_List") + list is ArmResourceListByParent< + DataContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp new file mode 100644 index 0000000000..f5ea79aa59 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DataVersionBaseResource.tsp @@ -0,0 +1,87 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./DataContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(DataContainerResource) +model DataVersionBaseResource is ProxyResource { + @doc("Version identifier.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface DataVersionBaseResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryDataVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryDataVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryDataVersions_Delete") + delete is ArmResourceDeleteAsync< + DataVersionBaseResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List data versions in the data container") + @operationId("RegistryDataVersions_List") + list is ArmResourceListByParent< + DataVersionBaseResource, + { + ...BaseParameters; + + @doc("Please choose OrderBy value from ['createdtime', 'modifiedtime']") + @query("$orderBy") + $orderBy?: string; + + @doc(""" +Top count of results, top count cannot be greater than the page size. + If topCount > page size, results with be default page size count will be returned +""") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("$tags") + $tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Generate a storage location and credential for the client to upload a data asset to.") + @operationId("RegistryDataVersions_CreateOrGetStartPendingUpload") + createOrGetStartPendingUpload is ArmResourceActionSync< + DataVersionBaseResource, + PendingUploadRequestDto, + PendingUploadResponseDto + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp new file mode 100644 index 0000000000..a3d5623fc7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/DatastoreResource.tsp @@ -0,0 +1,100 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model DatastoreResource is ProxyResource { + @doc("Datastore name.") + @path + @key("name") + @segment("datastores") + name: string; +} + +@armResourceOperations +interface DatastoreResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get datastore.") + @operationId("Datastores_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update datastore.") + @operationId("Datastores_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync< + DatastoreResource, + { + ...BaseParameters; + + @doc("Flag to skip validation.") + @query("skipValidation") + skipValidation?: boolean; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete datastore.") + @operationId("Datastores_Delete") + delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List datastores.") + @operationId("Datastores_List") + list is ArmResourceListByParent< + DatastoreResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Maximum number of results to return.") + @query("count") + count?: int32 = 30; + + @doc("Filter down to the workspace default datastore.") + @query("isDefault") + isDefault?: boolean; + + @doc("Names of datastores to return.") + @query({ + name: "names", + format: "csv", + }) + names?: string[]; + + @doc("Text to search for in the datastore names.") + @query("searchText") + searchText?: string; + + @doc("Order by property (createdtime | modifiedtime | name).") + @query("orderBy") + orderBy?: string; + + @doc("Order by property in ascending order.") + @query("orderByAsc") + orderByAsc?: boolean; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get datastore secrets.") + @operationId("Datastores_ListSecrets") + listSecrets is ArmResourceActionSync< + DatastoreResource, + void, + DatastoreSecrets + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp new file mode 100644 index 0000000000..37466020e3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentContainerResource.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model EnvironmentContainerResource is ProxyResource { + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("environmentName") + @segment("environments") + name: string; +} + +@armResourceOperations +interface EnvironmentContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryEnvironmentContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update container.") + @operationId("RegistryEnvironmentContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryEnvironmentContainers_Delete") + delete is ArmResourceDeleteAsync< + EnvironmentContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List environment containers.") + @operationId("RegistryEnvironmentContainers_List") + list is ArmResourceListByParent< + EnvironmentContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp new file mode 100644 index 0000000000..ce9e982412 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/EnvironmentVersionResource.tsp @@ -0,0 +1,75 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./EnvironmentContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(EnvironmentContainerResource) +model EnvironmentVersionResource is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface EnvironmentVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryEnvironmentVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryEnvironmentVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryEnvironmentVersions_Delete") + delete is ArmResourceDeleteAsync< + EnvironmentVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryEnvironmentVersions_List") + list is ArmResourceListByParent< + EnvironmentVersionResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Stage for including/excluding (for example) archived entities. Takes priority over listViewType") + @query("stage") + stage?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp new file mode 100644 index 0000000000..17901e3e49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Feature.tsp @@ -0,0 +1,50 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FeaturesetVersion.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(FeaturesetVersion) +model Feature is ProxyResource { + @doc("Feature Name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("featureName") + @segment("features") + name: string; +} + +@armResourceOperations +interface Features { + @doc("Get feature.") + get is ArmResourceRead; + + @doc("List Features.") + list is ArmResourceListByParent< + Feature, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("Description of the featureset.") + @query("description") + description?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp new file mode 100644 index 0000000000..b488344b90 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetContainer.tsp @@ -0,0 +1,71 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model FeaturesetContainer is ProxyResource { + @doc("Container name. This is case-sensitive.") + @path + @key("name") + @segment("featuresets") + name: string; +} + +@armResourceOperations +interface FeaturesetContainers { + @doc("Get container.") + getEntity is ArmResourceRead; + + @doc("Create or update container.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete container.") + delete is ArmResourceDeleteAsync< + FeaturesetContainer, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List featurestore entity containers.") + list is ArmResourceListByParent< + FeaturesetContainer, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("description for the feature set") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp new file mode 100644 index 0000000000..3d818c1811 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturesetVersion.tsp @@ -0,0 +1,114 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FeaturesetContainer.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(FeaturesetContainer) +model FeaturesetVersion is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface FeaturesetVersions { + @doc("Get version.") + get is ArmResourceRead; + + @doc("Create or update version.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete version.") + delete is ArmResourceDeleteAsync< + FeaturesetVersion, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List versions.") + list is ArmResourceListByParent< + FeaturesetVersion, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("name for the featureset version") + @query("versionName") + versionName?: string; + + @doc("description for the feature set version") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + + @doc("Specifies the featurestore stage") + @query("stage") + stage?: string; + } + >; + + @doc("Backfill.") + backfill is ArmResourceActionAsync< + FeaturesetVersion, + FeaturesetVersionBackfillRequest, + FeaturesetJob, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List materialization Jobs.") + listMaterializationJobs is ArmResourceActionSync< + FeaturesetVersion, + void, + FeaturesetJobArmPaginatedResult, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("filters") + filters?: string; + + @doc("Start time of the feature window to filter materialization jobs.") + @query("featureWindowStart") + featureWindowStart?: string; + + @doc("End time of the feature window to filter materialization jobs.") + @query("featureWindowEnd") + featureWindowEnd?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp new file mode 100644 index 0000000000..d869cda01d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityContainer.tsp @@ -0,0 +1,72 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model FeaturestoreEntityContainer + is ProxyResource { + @doc("Container name. This is case-sensitive.") + @path + @key("name") + @segment("featurestoreEntities") + name: string; +} + +@armResourceOperations +interface FeaturestoreEntityContainers { + @doc("Get container.") + getEntity is ArmResourceRead; + + @doc("Create or update container.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete container.") + delete is ArmResourceDeleteAsync< + FeaturestoreEntityContainer, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List featurestore entity containers.") + list is ArmResourceListByParent< + FeaturestoreEntityContainer, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("description for the featurestore entity") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp new file mode 100644 index 0000000000..8f39a997a9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/FeaturestoreEntityVersion.tsp @@ -0,0 +1,80 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./FeaturestoreEntityContainer.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(FeaturestoreEntityContainer) +model FeaturestoreEntityVersion + is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface FeaturestoreEntityVersions { + @doc("Get version.") + get is ArmResourceRead; + + @doc("Create or update version.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete version.") + delete is ArmResourceDeleteAsync< + FeaturestoreEntityVersion, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List versions.") + list is ArmResourceListByParent< + FeaturestoreEntityVersion, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("page size") + @query("pageSize") + pageSize?: int32 = 20; + + @doc("name for the featurestore entity version") + @query("versionName") + versionName?: string; + + @doc("description for the feature entity version") + @query("description") + description?: string; + + @doc("createdBy user name") + @query("createdBy") + createdBy?: string; + + @doc("Specifies the featurestore stage") + @query("stage") + stage?: string; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp new file mode 100644 index 0000000000..b049ad67b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/JobBaseResource.tsp @@ -0,0 +1,99 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model JobBaseResource is ProxyResource { + @doc("The name and identifier for the Job. This is case-sensitive.") + @path + @key("id") + @segment("jobs") + name: string; +} + +@armResourceOperations +interface JobBaseResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets a Job by name/id.") + @operationId("Jobs_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates and executes a Job.") + @operationId("Jobs_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Updates a Job.") + @operationId("Jobs_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes a Job (asynchronous).") + @operationId("Jobs_Delete") + delete is ArmResourceDeleteAsync< + JobBaseResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists Jobs in the workspace.") + @operationId("Jobs_List") + list is ArmResourceListByParent< + JobBaseResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Type of job to be returned.") + @query("jobType") + jobType?: string; + + @doc("Jobs returned will have this tag key.") + @query("tag") + tag?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Asset name the job's named output is registered with") + @query("assetName") + assetName?: string; + + @doc("Indicator whether the job is scheduled job.") + @query("scheduled") + scheduled?: boolean; + + @doc("The scheduled id for listing the job triggered from") + @query("scheduleId") + scheduleId?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Cancels a Job (asynchronous).") + @operationId("Jobs_Cancel") + cancel is ArmResourceActionAsync< + JobBaseResource, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp new file mode 100644 index 0000000000..330a821ee4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/LabelingJob.tsp @@ -0,0 +1,85 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model LabelingJob is ProxyResource { + @doc("The name and identifier for the LabelingJob.") + @path + @key("id") + @segment("labelingJobs") + name: string; +} + +@armResourceOperations +interface LabelingJobs { + @doc("Gets a labeling job by name/id.") + get is ArmResourceRead< + LabelingJob, + { + ...BaseParameters; + + @doc("Boolean value to indicate whether to include JobInstructions in response.") + @query("includeJobInstructions") + includeJobInstructions?: boolean; + + @doc("Boolean value to indicate Whether to include LabelCategories in response.") + @query("includeLabelCategories") + includeLabelCategories?: boolean; + } + >; + + @doc("Creates or updates a labeling job (asynchronous).") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete a labeling job.") + delete is ArmResourceDeleteSync; + + @doc("Lists labeling jobs in the workspace.") + list is ArmResourceListByParent< + LabelingJob, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Number of labeling jobs to return.") + @query("$top") + $top?: int32; + } + >; + + @doc("Export labels from a labeling job (asynchronous).") + exportLabels is ArmResourceActionAsync< + LabelingJob, + ExportSummary, + ExportSummary, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Pause a labeling job.") + pause is ArmResourceActionSync; + + @doc("Resume a labeling job (asynchronous).") + resume is ArmResourceActionAsync< + LabelingJob, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp new file mode 100644 index 0000000000..e0868af4cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelContainerResource.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Registry.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Registry) +model ModelContainerResource is ProxyResource { + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + @key("modelName") + @segment("models") + name: string; +} + +@armResourceOperations +interface ModelContainerResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get container.") + @operationId("RegistryModelContainers_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update model container.") + @operationId("RegistryModelContainers_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete container.") + @operationId("RegistryModelContainers_Delete") + delete is ArmResourceDeleteAsync< + ModelContainerResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List model containers.") + @operationId("RegistryModelContainers_List") + list is ArmResourceListByParent< + ModelContainerResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp new file mode 100644 index 0000000000..17d1d81392 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/ModelVersionResource.tsp @@ -0,0 +1,103 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./ModelContainerResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(ModelContainerResource) +model ModelVersionResource is ProxyResource { + @doc("Version identifier. This is case-sensitive.") + @path + @key("version") + @segment("versions") + name: string; +} + +@armResourceOperations +interface ModelVersionResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get version.") + @operationId("RegistryModelVersions_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update version.") + @operationId("RegistryModelVersions_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete version.") + @operationId("RegistryModelVersions_Delete") + delete is ArmResourceDeleteAsync< + ModelVersionResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List versions.") + @operationId("RegistryModelVersions_List") + list is ArmResourceListByParent< + ModelVersionResource, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Model description.") + @query("description") + description?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2") + @query("properties") + properties?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Model Version Package operation.") + @operationId("RegistryModelVersions_Package") + package is ArmResourceActionAsync< + ModelVersionResource, + PackageRequest, + PackageResponse, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Generate a storage location and credential for the client to upload a model asset to.") + @operationId("RegistryModelVersions_CreateOrGetStartPendingUpload") + createOrGetStartPendingUpload is ArmResourceActionSync< + ModelVersionResource, + PendingUploadRequestDto, + PendingUploadResponseDto + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp new file mode 100644 index 0000000000..b0ca858ce3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineDeploymentTrackedResource.tsp @@ -0,0 +1,132 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./OnlineEndpointTrackedResource.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(OnlineEndpointTrackedResource) +model OnlineDeploymentTrackedResource is TrackedResource { + @doc("Inference Endpoint Deployment name.") + @path + @key("deploymentName") + @segment("deployments") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface OnlineDeploymentTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get Inference Deployment Deployment.") + @operationId("OnlineDeployments_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update Inference Endpoint Deployment (asynchronous).") + @operationId("OnlineDeployments_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update Online Deployment (asynchronous).") + @operationId("OnlineDeployments_Update") + update is ArmCustomPatchAsync< + OnlineDeploymentTrackedResource, + PartialMinimalTrackedResourceWithSku + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Inference Endpoint Deployment (asynchronous).") + @operationId("OnlineDeployments_Delete") + delete is ArmResourceDeleteAsync< + OnlineDeploymentTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List Inference Endpoint Deployments.") + @operationId("OnlineDeployments_List") + list is ArmResourceListByParent< + OnlineDeploymentTrackedResource, + { + ...BaseParameters; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Top of list.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Polls an Endpoint operation.") + @operationId("OnlineDeployments_GetLogs") + getLogs is ArmResourceActionSync< + OnlineDeploymentTrackedResource, + DeploymentLogsRequest, + DeploymentLogs + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("OnlineDeployments_ListSkus") + @summary("List Inference Endpoint Deployment Skus.") + @doc("List Inference Endpoint Deployment Skus.") + // FIXME: OnlineDeployments_ListSkus could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/onlineEndpoints/{endpointName}/deployments/{deploymentName}/skus") + @get + ListSkus is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Inference endpoint name.") + @path + endpointName: string; + + @doc("Inference Endpoint Deployment name.") + @path + deploymentName: string; + + @doc("Number of Skus to be retrieved in a page of results.") + @query("count") + count?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + }, + SkuResourceArmPaginatedResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp new file mode 100644 index 0000000000..240759640a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OnlineEndpointTrackedResource.tsp @@ -0,0 +1,124 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(Workspace) +model OnlineEndpointTrackedResource is TrackedResource { + @doc("Online Endpoint name.") + @path + @key("endpointName") + @segment("onlineEndpoints") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface OnlineEndpointTrackedResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Get Online Endpoint.") + @operationId("OnlineEndpoints_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update Online Endpoint (asynchronous).") + @operationId("OnlineEndpoints_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update Online Endpoint (asynchronous).") + @operationId("OnlineEndpoints_Update") + update is ArmCustomPatchAsync< + OnlineEndpointTrackedResource, + PartialMinimalTrackedResourceWithIdentity + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete Online Endpoint (asynchronous).") + @operationId("OnlineEndpoints_Delete") + delete is ArmResourceDeleteAsync< + OnlineEndpointTrackedResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List Online Endpoints.") + @operationId("OnlineEndpoints_List") + list is ArmResourceListByParent< + OnlineEndpointTrackedResource, + { + ...BaseParameters; + + @doc("Name of the endpoint.") + @query("name") + name?: string; + + @doc("Number of endpoints to be retrieved in a page of results.") + @query("count") + count?: int32; + + @doc("EndpointComputeType to be filtered by.") + @query("computeType") + computeType?: EndpointComputeType; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("A set of tags with which to filter the returned models. It is a comma separated string of tags key or tags key=value. Example: tagKey1,tagKey2,tagKey3=value3 .") + @query("tags") + tags?: string; + + @doc("A set of properties with which to filter the returned models. It is a comma separated string of properties key and/or properties key=value Example: propKey1,propKey2,propKey3=value3 .") + @query("properties") + properties?: string; + + @doc("The option to order the response.") + @query("orderBy") + orderBy?: OrderString; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List EndpointAuthKeys for an Endpoint using Key-based authentication.") + @operationId("OnlineEndpoints_ListKeys") + listKeys is ArmResourceActionSync< + OnlineEndpointTrackedResource, + void, + EndpointAuthKeys + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Regenerate EndpointAuthKeys for an Endpoint using Key-based authentication (asynchronous).") + @operationId("OnlineEndpoints_RegenerateKeys") + regenerateKeys is ArmResourceActionAsync< + OnlineEndpointTrackedResource, + RegenerateEndpointKeysRequest, + void, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Retrieve a valid AML token for an Endpoint using AMLToken-based authentication.") + @operationId("OnlineEndpoints_GetToken") + getToken is ArmResourceActionSync< + OnlineEndpointTrackedResource, + void, + EndpointAuthToken + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp new file mode 100644 index 0000000000..20c250eaff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/OutboundRuleBasicResource.tsp @@ -0,0 +1,51 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Outbound Rule Basic Resource for the managed network of a machine learning workspace.") +@parentResource(Workspace) +model OutboundRuleBasicResource is ProxyResource { + @doc("Name of the workspace managed network outbound rule") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("ruleName") + @segment("outboundRules") + name: string; +} + +@armResourceOperations +interface OutboundRuleBasicResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Gets an outbound rule from the managed network of a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Creates or updates an outbound rule in the managed network of a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + OutboundRuleBasicResource, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Deletes an outbound rule from the managed network of a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_Delete") + delete is ArmResourceDeleteAsync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists the managed network outbound rules for a machine learning workspace.") + @operationId("ManagedNetworkSettingsRule_List") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp new file mode 100644 index 0000000000..b2bf3862fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/PrivateEndpointConnection.tsp @@ -0,0 +1,45 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("The Private Endpoint Connection resource.") +@parentResource(Workspace) +model PrivateEndpointConnection + is TrackedResource { + @doc("NRP Private Endpoint Connection Name") + @path + @key("privateEndpointConnectionName") + @segment("privateEndpointConnections") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; +} + +@armResourceOperations +interface PrivateEndpointConnections { + @doc("Called by end-users to get a PE connection.") + get is ArmResourceRead; + + @doc(""" +Called by end-users to approve or reject a PE connection. +This method must validate and forward the call to NRP. +""") + createOrUpdate is ArmResourceCreateOrReplaceSync; + + @doc("Called by end-users to delete a PE connection.") + delete is ArmResourceDeleteSync; + + @doc("Called by end-users to get all PE connections.") + list is ArmResourceListByParent; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp new file mode 100644 index 0000000000..004cb1e443 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Registry.tsp @@ -0,0 +1,64 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +model Registry is TrackedResource { + @doc("Name of Azure Machine Learning registry. This is case-insensitive") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{2,32}$") + @path + @key("registryName") + @segment("registries") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface Registries { + @doc("Get registry") + get is ArmResourceRead; + + @doc("Create or update registry") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Registry, + BaseParameters, + ArmAsyncOperationHeader + >; + + @doc("Update tags") + update is ArmCustomPatchSync; + + @doc("Delete registry") + delete is ArmResourceDeleteAsync< + Registry, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List registries") + list is ArmResourceListByParent; + + @doc("List registries by subscription") + listBySubscription is ArmListBySubscription; + + @doc("Remove regions from registry") + removeRegions is ArmResourceActionAsync< + Registry, + Registry, + Registry, + BaseParameters, + ArmLroLocationHeader + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp new file mode 100644 index 0000000000..29df360256 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Schedule.tsp @@ -0,0 +1,55 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("Azure Resource Manager resource envelope.") +@parentResource(Workspace) +model Schedule is ProxyResource { + @doc("Schedule name.") + @path + @key("name") + @segment("schedules") + name: string; +} + +@armResourceOperations +interface Schedules { + @doc("Get schedule.") + get is ArmResourceRead; + + @doc("Create or update schedule.") + createOrUpdate is ArmResourceCreateOrUpdateAsync; + + @doc("Delete schedule.") + delete is ArmResourceDeleteAsync< + Schedule, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("List schedules in specified workspace.") + list is ArmResourceListByParent< + Schedule, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Status filter for schedule.") + @query("listViewType") + listViewType?: ScheduleListViewType; + } + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp new file mode 100644 index 0000000000..2608367d4c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/Workspace.tsp @@ -0,0 +1,228 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; +@doc("An object that represents a machine learning workspace.") +model Workspace is TrackedResource { + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("workspaceName") + @segment("workspaces") + name: string; + + ...Azure.ResourceManager.ManagedServiceIdentity; + ...Azure.ResourceManager.ResourceSku; + ...Azure.ResourceManager.ResourceKind; +} + +@armResourceOperations +interface Workspaces { + @doc("Gets the properties of the specified machine learning workspace.") + get is ArmResourceRead; + + @doc("Creates or updates a workspace with the specified parameters.") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Workspace, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Updates a machine learning workspace with the specified parameters.") + update is ArmCustomPatchAsync; + + @doc("Deletes a machine learning workspace.") + delete is ArmResourceDeleteAsync< + Workspace, + { + ...BaseParameters; + + @doc("Flag to indicate delete is a purge request.") + @query("forceToPurge") + forceToPurge?: boolean; + } + >; + + @doc("Lists all the available machine learning workspaces under the specified resource group.") + listByResourceGroup is ArmResourceListByParent< + Workspace, + { + ...BaseParameters; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Kind of workspace.") + @query("kind") + kind?: string; + } + >; + + @doc("Lists all the available machine learning workspaces under the specified subscription.") + listBySubscription is ArmListBySubscription; + + @doc("Diagnose workspace setup issue.") + diagnose is ArmResourceActionAsync< + Workspace, + DiagnoseWorkspaceParameters, + DiagnoseResponseResult, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Lists all the keys associated with this workspace. This includes keys for the storage account, app insights and password for container registry.") + listKeys is ArmResourceActionSync; + + @doc("Get Azure Machine Learning Workspace notebook access token") + listNotebookAccessToken is ArmResourceActionSync< + Workspace, + void, + NotebookAccessTokenResult + >; + + @doc("Lists keys of Azure Machine Learning Workspaces notebook.") + listNotebookKeys is ArmResourceActionSync< + Workspace, + void, + ListNotebookKeysResult + >; + + @doc("Lists keys of Azure Machine Learning Workspace's storage account.") + listStorageAccountKeys is ArmResourceActionSync< + Workspace, + void, + ListStorageAccountKeysResult + >; + + @doc("Prepare Azure Machine Learning Workspace's notebook resource") + prepareNotebook is ArmResourceActionAsync< + Workspace, + void, + NotebookResourceInfo, + BaseParameters, + ArmLroLocationHeader + >; + + @doc("Resync all the keys associated with this workspace.This includes keys for the storage account, app insights and password for container registry") + resyncKeys is ArmResourceActionAsync< + Workspace, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Provisions the managed network of a machine learning workspace.") + @operationId("ManagedNetworkProvisions_ProvisionManagedNetwork") + provisionManagedNetwork is ArmResourceActionAsync< + Workspace, + ManagedNetworkProvisionOptions, + ManagedNetworkProvisionStatus, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("WorkspaceFeatures_List") + @doc("Lists all enabled features for a workspace") + // FIXME: WorkspaceFeatures_List could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/features") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + ListAmlUserFeatureResult + >; + + @summary("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") + @doc("Called by Client (Portal, CLI, etc) to get a list of all external outbound dependencies (FQDNs) programmatically.") + // FIXME: Workspaces_ListOutboundNetworkDependenciesEndpoints could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/outboundNetworkDependenciesEndpoints") + @get + ListOutboundNetworkDependenciesEndpoints is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + ExternalFqdnResponse + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_List") + @summary(""" +Called by Client (Portal, CLI, etc) to get available "private link resources" for the workspace. +Each "private link resource" is a connection endpoint (IP address) to the resource. +Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. +Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. +Defined in the "[NRP] Private Endpoint Design" doc, topic "GET API for GroupIds". +""") + @doc(""" +Called by Client (Portal, CLI, etc) to get available \"private link resources\" for the workspace. +Each \"private link resource\" is a connection endpoint (IP address) to the resource. +Pre single connection endpoint per workspace: the Data Plane IP address, returned by DNS resolution. +Other RPs, such as Azure Storage, have multiple - one for Blobs, other for Queues, etc. +Defined in the \"[NRP] Private Endpoint Design\" doc, topic \"GET API for GroupIds\". +""") + // FIXME: PrivateLinkResources_List could not be converted to a resource operation + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/privateLinkResources") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + }, + PrivateLinkResourceListResult + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp new file mode 100644 index 0000000000..356fc3f1aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/WorkspaceConnectionPropertiesV2BasicResource.tsp @@ -0,0 +1,78 @@ +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; +import "@typespec/rest"; +import "./models.tsp"; +import "./Workspace.tsp"; + +using TypeSpec.Rest; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Azure.ResourceManager.MachineLearning; + +@parentResource(Workspace) +model WorkspaceConnectionPropertiesV2BasicResource + is ProxyResource { + @doc("Friendly name of the workspace connection") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + @key("connectionName") + @segment("connections") + name: string; +} + +@armResourceOperations +interface WorkspaceConnectionPropertiesV2BasicResources { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists machine learning workspaces connections by name.") + @operationId("WorkspaceConnections_Get") + get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Create or update machine learning workspaces connections under the specified workspace.") + @operationId("WorkspaceConnections_Create") + create is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Update machine learning workspaces connections under the specified workspace.") + @operationId("WorkspaceConnections_Update") + update is ArmCustomPatchSync< + WorkspaceConnectionPropertiesV2BasicResource, + WorkspaceConnectionUpdateParameter + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Delete machine learning workspaces connections by name.") + @operationId("WorkspaceConnections_Delete") + delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("Lists all the available machine learning workspaces connections under the specified workspace.") + @operationId("WorkspaceConnections_List") + list is ArmResourceListByParent< + WorkspaceConnectionPropertiesV2BasicResource, + { + ...BaseParameters; + + @doc("Target of the workspace connection.") + @query("target") + target?: string; + + @doc("Category of the workspace connection.") + @query("category") + category?: string; + } + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @doc("List all the secrets of a machine learning workspaces connections.") + @operationId("WorkspaceConnections_ListSecrets") + listSecrets is ArmResourceActionSync< + WorkspaceConnectionPropertiesV2BasicResource, + void, + WorkspaceConnectionPropertiesV2BasicResource + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json new file mode 100644 index 0000000000..f61c67ed01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_CreateOrUpdate.json @@ -0,0 +1,222 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "cd3c37dc-2876-4ca4-8a54-21bd7619724a": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "4939850d-8eae-4343-8566-0826259a2ad1": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "b76755e4-16bf-45d4-b625-6634df7444cc": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchDeployments_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json new file mode 100644 index 0000000000..580da15ca9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "BatchDeployments_Delete", + "title": "Delete Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json new file mode 100644 index 0000000000..2b86fc6ea5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Get.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "843c2bb4-e5f1-4267-98c8-ba22a99dbb00": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchDeployments_Get", + "title": "Get Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json new file mode 100644 index 0000000000..0d5820113c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_List.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "a3c13e2e-a213-4cac-9f5a-b49966906ad6": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "BatchDeployments_List", + "title": "List Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json new file mode 100644 index 0000000000..de441ae4ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchDeployments_Update.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "compute": "string", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "errorThreshold": 1, + "loggingLevel": "Info", + "maxConcurrencyPerInstance": 1, + "miniBatchSize": 1, + "model": { + "assetId": "string", + "referenceType": "Id" + }, + "outputAction": "SummaryOnly", + "outputFileName": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "resources": { + "instanceCount": 1, + "instanceType": "string", + "properties": { + "string": { + "1e5e1cf9-b0ea-4cf6-9764-e750bf85c10a": null + } + } + }, + "retrySettings": { + "maxRetries": 1, + "timeout": "PT5M" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": { + "Location": "example_location" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "BatchDeployments_Update", + "title": "Update Workspace Batch Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json new file mode 100644 index 0000000000..07f594793d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_CreateOrUpdate.json @@ -0,0 +1,141 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json new file mode 100644 index 0000000000..ae97e5bdf4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testBatchEndpoint", + "resourceGroupName": "resourceGroup-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "BatchEndpoints_Delete", + "title": "Delete Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json new file mode 100644 index 0000000000..a347101b92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Get.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_Get", + "title": "Get Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json new file mode 100644 index 0000000000..b2b49b1bc9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_List.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_List", + "title": "List Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json new file mode 100644 index 0000000000..851de283ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_ListKeys.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "primaryKey": "string", + "secondaryKey": "string" + }, + "headers": {} + } + }, + "operationId": "BatchEndpoints_ListKeys", + "title": "ListKeys Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json new file mode 100644 index 0000000000..bfaa5aa409 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/BatchEndpoints_Update.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "defaults": { + "deploymentName": "string" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example" + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": { + "Location": "example_location" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "BatchEndpoints_Update", + "title": "Update Workspace Batch Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json new file mode 100644 index 0000000000..ddbbbc4876 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_AttachAKubernetesCompute.json @@ -0,0 +1,125 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default" + }, + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "extensionInstanceReleaseTrain": "stable", + "extensionPrincipalId": null, + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default", + "relayConnectionString": null, + "serviceBusConnectionString": null, + "vcName": null + }, + "provisioningState": "Creating", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "extensionInstanceReleaseTrain": "stable", + "extensionPrincipalId": null, + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default", + "relayConnectionString": null, + "serviceBusConnectionString": null, + "vcName": null + }, + "provisioningState": "Creating", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Attach a Kubernetes Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json new file mode 100644 index 0000000000..ddb059c165 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAAmlCompute.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "AmlCompute", + "properties": { + "enableNodePublicIp": true, + "isolatedNetwork": false, + "osType": "Windows", + "remoteLoginPortPublicAccess": "NotSpecified", + "scaleSettings": { + "maxNodeCount": 1, + "minNodeCount": 0, + "nodeIdleTimeBeforeScaleDown": "PT5M" + }, + "virtualMachineImage": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Compute/galleries/myImageGallery/images/myImageDefinition/versions/0.0.1" + }, + "vmPriority": "Dedicated", + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AmlCompute", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AmlCompute", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create a AML Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json new file mode 100644 index 0000000000..a2643a8874 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateADataFactoryCompute.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "DataFactory" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "DataFactory", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "DataFactory", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create a DataFactory Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json new file mode 100644 index 0000000000..5df21792d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnAksCompute.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "AKS" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AKS", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "AKS", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an AKS Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json new file mode 100644 index 0000000000..ca6a050b8e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceCompute.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "applicationSharingPolicy": "Personal", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "computeInstanceAuthorizationType": "personal", + "customServices": [ + { + "name": "rstudio-workbench", + "docker": { + "privileged": true + }, + "endpoints": [ + { + "name": "connect", + "hostIp": null, + "published": 4444, + "target": 8787, + "protocol": "http" + } + ], + "environmentVariables": { + "RSP_LICENSE": { + "type": "local", + "value": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX" + } + }, + "image": { + "type": "docker", + "reference": "ghcr.io/azure/rstudio-workbench:latest" + }, + "volumes": [ + { + "type": "bind", + "readOnly": true, + "source": "/mnt/azureuser/", + "target": "/home/testuser/" + } + ] + } + ], + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "sshSettings": { + "sshPublicAccess": "Disabled" + }, + "subnet": { + "id": "test-subnet-resource-id" + }, + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json new file mode 100644 index 0000000000..d450bf6ddc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithMinimalInputs.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an ComputeInstance Compute with minimal inputs" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json new file mode 100644 index 0000000000..d105af37cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_CreateAnComputeInstanceComputeWithSchedules.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "properties": { + "applicationSharingPolicy": "Personal", + "computeInstanceAuthorizationType": "personal", + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "schedules": { + "computeStartStop": [ + { + "action": "Stop", + "cron": { + "expression": "0 18 * * *", + "startTime": "2021-04-23T01:30:00", + "timeZone": "Pacific Standard Time" + }, + "status": "Enabled", + "triggerType": "Cron" + } + ] + }, + "sshSettings": { + "sshPublicAccess": "Disabled" + }, + "vmSize": "STANDARD_NC6" + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "computeType": "ComputeInstance", + "provisioningState": "Creating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Create an ComputeInstance Compute with Schedules" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json new file mode 100644 index 0000000000..5943cda50a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAAmlCompute.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "properties": { + "scaleSettings": { + "maxNodeCount": 4, + "minNodeCount": 4, + "nodeIdleTimeBeforeScaleDown": "PT5M" + } + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "allocationState": "Resizing", + "allocationStateTransitionTime": "2017-09-27T22:28:08.998Z", + "currentNodeCount": 0, + "enableNodePublicIp": true, + "errors": null, + "isolatedNetwork": false, + "nodeStateCounts": { + "idleNodeCount": 0, + "leavingNodeCount": 0, + "preemptedNodeCount": 0, + "preparingNodeCount": 0, + "runningNodeCount": 0, + "unusableNodeCount": 0 + }, + "osType": "Windows", + "remoteLoginPortPublicAccess": "Enabled", + "scaleSettings": { + "maxNodeCount": 1, + "minNodeCount": 0, + "nodeIdleTimeBeforeScaleDown": "PT5M" + }, + "subnet": { + "id": "test-subnet-resource-id" + }, + "targetNodeCount": 1, + "virtualMachineImage": null, + "vmPriority": "Dedicated", + "vmSize": "STANDARD_NC6" + }, + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "provisioningState": "Updating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Update a AML Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json new file mode 100644 index 0000000000..89e10c425b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_CreateOrUpdate_UpdateAnAksCompute.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "properties": { + "agentCount": 4 + }, + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "properties": { + "agentCount": 4 + }, + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + }, + "201": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "provisioningState": "Updating", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_CreateOrUpdate", + "title": "Update an AKS Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json new file mode 100644 index 0000000000..cb7e7cde38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Delete.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "underlyingResourceAction": "Delete", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus...", + "Location": "https://management.azure.com/subscriptions/...pathToOperationResult..." + } + }, + "204": {} + }, + "operationId": "Compute_Delete", + "title": "Delete Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json new file mode 100644 index 0000000000..ca11d38b71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAksCompute.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get a AKS Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json new file mode 100644 index 0000000000..c4f2fdcafd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAAmlCompute.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "allocationState": "Resizing", + "allocationStateTransitionTime": "2017-09-27T22:28:08.998Z", + "currentNodeCount": 0, + "enableNodePublicIp": true, + "errors": null, + "isolatedNetwork": false, + "nodeStateCounts": { + "idleNodeCount": 0, + "leavingNodeCount": 0, + "preemptedNodeCount": 0, + "preparingNodeCount": 0, + "runningNodeCount": 0, + "unusableNodeCount": 0 + }, + "osType": "Windows", + "remoteLoginPortPublicAccess": "Enabled", + "scaleSettings": { + "maxNodeCount": 1, + "minNodeCount": 0, + "nodeIdleTimeBeforeScaleDown": "PT5M" + }, + "subnet": { + "id": "test-subnet-resource-id" + }, + "targetNodeCount": 1, + "virtualMachineImage": null, + "vmPriority": "Dedicated", + "vmSize": "STANDARD_NC6" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get a AML Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json new file mode 100644 index 0000000000..b54d6fa433 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAKubernetesCompute.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "Kubernetes", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "isAttachedCompute": true, + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "defaultInstanceType": "defaultInstanceType", + "extensionInstanceReleaseTrain": "stable", + "extensionPrincipalId": null, + "instanceTypes": { + "defaultInstanceType": { + "nodeSelector": null, + "resources": { + "limits": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + }, + "requests": { + "cpu": "1", + "memory": "4Gi", + "nvidia.com/gpu": null + } + } + } + }, + "namespace": "default", + "relayConnectionString": null, + "serviceBusConnectionString": null, + "vcName": null + }, + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get a Kubernetes Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json new file mode 100644 index 0000000000..6f6677b0cd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Get_GetAnComputeInstance.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "ComputeInstance", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "properties": { + "applicationSharingPolicy": "Shared", + "applications": [ + { + "displayName": "Jupyter", + "endpointUri": "https://compute123.eastus2.azureml.net/jupyter" + } + ], + "computeInstanceAuthorizationType": "personal", + "connectivityEndpoints": { + "privateIpAddress": "10.0.0.1", + "publicIpAddress": "10.0.0.1" + }, + "createdBy": { + "userId": "00000000-0000-0000-0000-000000000000", + "userName": "foobar@microsoft.com", + "userOrgId": "00000000-0000-0000-0000-000000000000" + }, + "customServices": [ + { + "name": "rstudio-workbench", + "docker": { + "privileged": true + }, + "endpoints": [ + { + "name": "connect", + "hostIp": null, + "published": 4444, + "target": 8787, + "protocol": "http" + } + ], + "environmentVariables": { + "RSP_LICENSE": { + "type": "local", + "value": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX" + } + }, + "image": { + "type": "docker", + "reference": "ghcr.io/azure/rstudio-workbench:latest" + }, + "volumes": [ + { + "type": "bind", + "bind": { + "createHostPath": true, + "propagation": "test", + "selinux": "test" + }, + "consistency": "test", + "readOnly": true, + "source": "/mnt/azureuser/", + "target": "/home/testuser/", + "tmpfs": { + "size": 10 + }, + "volume": { + "nocopy": true + } + } + ] + } + ], + "errors": null, + "osImageMetadata": { + "currentImageVersion": "22.06.14", + "isLatestOsImageVersion": false, + "latestImageVersion": "22.07.22" + }, + "personalComputeInstanceSettings": { + "assignedUser": { + "objectId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000" + } + }, + "sshSettings": { + "adminUserName": "azureuser", + "sshPort": 22, + "sshPublicAccess": "Enabled" + }, + "state": "Running", + "subnet": { + "id": "test-subnet-resource-id" + }, + "vmSize": "STANDARD_NC6" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "Compute_Get", + "title": "Get an ComputeInstance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json new file mode 100644 index 0000000000..ef0946b46a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_List.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "value": [ + { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute123-56826-c9b00420020b2" + } + }, + { + "name": "compute1234", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute1234", + "location": "eastus", + "properties": { + "description": "some compute", + "computeType": "AKS", + "createdOn": "2021-04-01T22:00:00.0000000+00:00", + "modifiedOn": "2021-04-01T22:00:00.0000000+00:00", + "provisioningState": "Succeeded", + "resourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testrg123/providers/Microsoft.ContainerService/managedClusters/compute1234-56826-c9b00420020b2" + } + } + ] + } + } + }, + "operationId": "Compute_List", + "title": "Get Computes" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json new file mode 100644 index 0000000000..cebcad4c1c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListKeys.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "adminKubeConfig": "admin kube config...", + "computeType": "AKS", + "imagePullSecretName": "the image pull secret name", + "userKubeConfig": "user kube config..." + } + } + }, + "operationId": "Compute_ListKeys", + "title": "List AKS Compute Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json new file mode 100644 index 0000000000..51d4bf9a2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_ListNodes.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "nodes": [ + { + "nodeId": "tvm-3601533753_1-20170719t162906z", + "nodeState": "running", + "port": 50000, + "privateIpAddress": "13.84.190.124", + "publicIpAddress": "13.84.190.134", + "runId": "2f378a44-38f2-443a-9f0d-9909d0b47890" + }, + { + "nodeId": "tvm-3601533753_2-20170719t162906z", + "nodeState": "idle", + "port": 50001, + "privateIpAddress": "13.84.190.124", + "publicIpAddress": "13.84.190.134" + } + ] + } + } + }, + "operationId": "Compute_ListNodes", + "title": "Get compute nodes information for a compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json new file mode 100644 index 0000000000..3199194449 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Restart.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Compute_Restart", + "title": "Restart ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json new file mode 100644 index 0000000000..4fb98622b2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Start.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Compute_Start", + "title": "Start ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json new file mode 100644 index 0000000000..7e7dbc7b63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Stop.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Compute_Stop", + "title": "Stop ComputeInstance Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json new file mode 100644 index 0000000000..6ecb2f4372 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_Update.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "properties": { + "properties": { + "scaleSettings": { + "maxNodeCount": 4, + "minNodeCount": 4, + "nodeIdleTimeBeforeScaleDown": "PT5M" + } + } + } + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "name": "compute123", + "type": "Microsoft.MachineLearningServices/workspaces/computes", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/workspaces123/computes/compute123", + "location": "eastus2", + "properties": { + "description": "some compute", + "computeType": "AmlCompute", + "provisioningState": "Updating" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus..." + } + } + }, + "operationId": "Compute_Update", + "title": "Update a AmlCompute Compute" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json new file mode 100644 index 0000000000..5dec89f71f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateCustomServices.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "customServices": [ + { + "name": "rstudio-workbench", + "docker": { + "privileged": true + }, + "endpoints": [ + { + "name": "connect", + "hostIp": null, + "published": 4444, + "target": 8787, + "protocol": "http" + } + ], + "environmentVariables": { + "RSP_LICENSE": { + "type": "local", + "value": "XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX" + } + }, + "image": { + "type": "docker", + "reference": "ghcr.io/azure/rstudio-workbench:latest" + }, + "volumes": [ + { + "type": "bind", + "readOnly": true, + "source": "/mnt/azureuser/", + "target": "/home/testuser/" + } + ] + } + ], + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {} + }, + "operationId": "Compute_UpdateCustomServices", + "title": "Update Custom Services" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json new file mode 100644 index 0000000000..b1bbbf4582 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Compute_UpdateIdleShutdownSetting.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "computeName": "compute123", + "parameters": { + "idleTimeBeforeShutdown": "PT120M" + }, + "resourceGroupName": "testrg123", + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {} + }, + "operationId": "Compute_UpdateIdleShutdownSetting", + "title": "Update idle shutdown setting of ComputeInstance" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json new file mode 100644 index 0000000000..be992ff812 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureBlobWAccountKey.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "key": "string", + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (AzureBlob w/ AccountKey)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json new file mode 100644 index 0000000000..f959c61251 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen1WServicePrincipal.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "clientSecret": "string", + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen1", + "properties": null, + "storeName": "string", + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen1", + "properties": null, + "storeName": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen1", + "properties": null, + "storeName": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json new file mode 100644 index 0000000000..074f8107f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureDataLakeGen2WServicePrincipal.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "clientSecret": "string", + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen2", + "endpoint": "string", + "filesystem": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen2", + "endpoint": "string", + "filesystem": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "authorityUrl": "string", + "clientId": "00000000-1111-2222-3333-444444444444", + "credentialsType": "ServicePrincipal", + "resourceUrl": "string", + "secrets": { + "secretsType": "ServicePrincipal" + }, + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "datastoreType": "AzureDataLakeGen2", + "endpoint": "string", + "filesystem": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json new file mode 100644 index 0000000000..ef1785cf87 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_CreateOrUpdate_CreateOrUpdateDatastoreAzureFileStoreWAccountKey.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "key": "string", + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureFile", + "endpoint": "string", + "fileShareName": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + } + }, + "resourceGroupName": "test-rg", + "skipValidation": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureFile", + "endpoint": "string", + "fileShareName": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureFile", + "endpoint": "string", + "fileShareName": "string", + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "string" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_CreateOrUpdate", + "title": "CreateOrUpdate datastore (Azure File store w/ AccountKey)." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json new file mode 100644 index 0000000000..e880e6aaff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "Datastores_Delete", + "title": "Delete datastore." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json new file mode 100644 index 0000000000..e2f9633057 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Datastores_Get", + "title": "Get datastore." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json new file mode 100644 index 0000000000..0a34b55bb9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "isDefault": false, + "names": [ + "string" + ], + "orderBy": "string", + "orderByAsc": false, + "resourceGroupName": "test-rg", + "searchText": "string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "accountName": "string", + "containerName": "string", + "credentials": { + "credentialsType": "AccountKey", + "secrets": { + "secretsType": "AccountKey" + } + }, + "datastoreType": "AzureBlob", + "endpoint": "core.windows.net", + "isDefault": false, + "properties": null, + "tags": { + "string": "string" + }, + "protocol": "https" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Datastores_List", + "title": "List datastores." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json new file mode 100644 index 0000000000..0a71ab5f73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Datastores_ListSecrets.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "key": "string", + "secretsType": "AccountKey" + }, + "headers": {} + } + }, + "operationId": "Datastores_ListSecrets", + "title": "Get datastore secrets." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json new file mode 100644 index 0000000000..76ddad2646 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_Get.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "featureName": "string", + "featuresetName": "string", + "featuresetVersion": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "Float", + "featureName": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:51", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:51", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Features_Get", + "title": "Get Feature." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json new file mode 100644 index 0000000000..b18e4e0d77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Features_List.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "description": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "featureName": "string", + "featuresetName": "string", + "featuresetVersion": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "Boolean", + "featureName": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:50", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:50", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Features_List", + "title": "List Feature." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..11571db7c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_CreateOrUpdate.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:48", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:48", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:48", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:48", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetContainers_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json new file mode 100644 index 0000000000..5bd9c1a3b9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturesetContainers_Delete", + "title": "Delete Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json new file mode 100644 index 0000000000..e506716a00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_GetEntity.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Deleting", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:49", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:49", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetContainers_GetEntity", + "title": "GetEntity Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json new file mode 100644 index 0000000000..99a28993a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetContainers_List.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "ArchivedOnly", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:46", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:46", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturesetContainers_List", + "title": "List Workspace Featureset Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json new file mode 100644 index 0000000000..948bd3a1ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Backfill.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "description": "string", + "displayName": "string", + "featureWindow": { + "featureWindowEnd": "2020-01-01T12:34:56.999+00:51", + "featureWindowStart": "2020-01-01T12:34:56.999+00:51" + }, + "resource": { + "instanceType": "string" + }, + "sparkConfiguration": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "jobId": "string" + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "FeaturesetVersions_Backfill", + "title": "Backfill Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..dcac941cac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_CreateOrUpdate.json @@ -0,0 +1,221 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Day", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Monday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "Online" + }, + "properties": { + "string": "string" + }, + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Day", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Wednesday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "OnlineAndOffline" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Deleting", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:52", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:52", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Hour", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Wednesday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "Offline" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Failed", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:52", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:52", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json new file mode 100644 index 0000000000..291b4ba208 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturesetVersions_Delete", + "title": "Delete Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json new file mode 100644 index 0000000000..2bbe768dea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_Get.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Minute", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Wednesday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "None" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:52", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:52", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_Get", + "title": "Get Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json new file mode 100644 index 0000000000..f09dd7bb99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_List.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "All", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "entities": [ + "string" + ], + "isAnonymous": false, + "isArchived": false, + "materializationSettings": { + "notification": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "resource": { + "instanceType": "string" + }, + "schedule": { + "endTime": "string", + "frequency": "Month", + "interval": 1, + "schedule": { + "hours": [ + 1 + ], + "minutes": [ + 1 + ], + "monthDays": [ + 1 + ], + "weekDays": [ + "Saturday" + ] + }, + "startTime": "string", + "timeZone": "string", + "triggerType": "Recurrence" + }, + "sparkConfiguration": { + "string": "string" + }, + "storeType": "Offline" + }, + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "specification": { + "path": "string" + }, + "stage": "string", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:49", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:49", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_List", + "title": "List Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json new file mode 100644 index 0000000000..3329792933 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturesetVersions_ListMaterializationJobs.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "featureWindowEnd": "string", + "featureWindowStart": "string", + "filters": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "type": "RecurrentMaterialization", + "createdDate": "2020-01-01T12:34:56.999+00:53", + "displayName": "string", + "duration": "PT5M", + "experimentId": "string", + "featureWindow": { + "featureWindowEnd": "2020-01-01T12:34:56.999+00:53", + "featureWindowStart": "2020-01-01T12:34:56.999+00:53" + }, + "jobId": "string", + "status": "CancelRequested", + "tags": { + "string": "string" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturesetVersions_ListMaterializationJobs", + "title": "ListMaterializationJobs Workspace Featureset Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..6528fd4beb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_CreateOrUpdate.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityContainers_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json new file mode 100644 index 0000000000..40bd3cc904 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturestoreEntityContainers_Delete", + "title": "Delete Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json new file mode 100644 index 0000000000..3f3681b9a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_GetEntity.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Updating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:43", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:43", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityContainers_GetEntity", + "title": "GetEntity Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json new file mode 100644 index 0000000000..0a7348058c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityContainers_List.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "All", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:43", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:43", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityContainers_List", + "title": "List Workspace Featurestore Entity Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..60fdafaec5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_CreateOrUpdate.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Datetime" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Integer" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:58", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:58", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Integer" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:58", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:58", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityVersions_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json new file mode 100644 index 0000000000..a6f2862252 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "FeaturestoreEntityVersions_Delete", + "title": "Delete Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json new file mode 100644 index 0000000000..21fff2c833 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_Get.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Datetime" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:57", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:57", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityVersions_Get", + "title": "Get Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json new file mode 100644 index 0000000000..382b469b26 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/FeaturestoreEntityVersions_List.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "ActiveOnly", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "indexColumns": [ + { + "columnName": "string", + "dataType": "Datetime" + } + ], + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:55", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:55", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "FeaturestoreEntityVersions_List", + "title": "List Workspace Featurestore Entity Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json new file mode 100644 index 0000000000..10363d4516 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Cancel.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Jobs_Cancel", + "title": "Cancel Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json new file mode 100644 index 0000000000..e7d113fc0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateAutoMlJob.json @@ -0,0 +1,335 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "f69c8d5a-9b39-4183-92d3-a2b18944cf95": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + } + } + }, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "a6f57022-8e31-44db-98e6-fa9495abb01c": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "94ce04ed-3b17-4e48-a2a6-a923068268fd": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "CancelRequested", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:22", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:22", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "parameters": { + "342c3b36-f4d6-4af6-8410-7198803cff8f": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "0aec33cb-4916-4b3b-b610-35f3f78cc6f0": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Provisioning", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:22", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:22", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate AutoML Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json new file mode 100644 index 0000000000..ee52bb0041 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateCommandJob.json @@ -0,0 +1,335 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "c9ac10d0-915b-4de5-afe8-a4c78a37a558": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + } + } + }, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "56fc2716-8290-4394-867e-14e89387af68": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "500bc411-5f81-4b2c-aae9-f84c33146a4c": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Queued", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "e3455adb-ad77-4518-985a-c60703f3d3ea": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Standard", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "56a57b62-09f2-48ee-a4ec-a19a230a6aa0": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Preparing", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate Command Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json new file mode 100644 index 0000000000..4a850526cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdatePipelineJob.json @@ -0,0 +1,170 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + } + } + }, + "settings": {}, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate Pipeline Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json new file mode 100644 index 0000000000..5611ad6c8d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_CreateOrUpdate_CreateOrUpdateSweepJob.json @@ -0,0 +1,335 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "5fc1f627-491e-45a0-a6a2-f5b4be884911": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + } + } + }, + "tags": { + "string": "string" + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "5489ee88-92db-4266-b321-ed47823d52b8": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Standard", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "b2de23ac-268c-459c-bbf3-0d8ece77d247": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Starting", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:25", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:25", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "307f11f6-ff8d-450d-b8a3-4c9d0f7d883f": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Standard", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "64db9b4b-db26-4473-9eb8-49e5e5cbeb3f": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Starting", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:25", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:25", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_CreateOrUpdate", + "title": "CreateOrUpdate Sweep Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json new file mode 100644 index 0000000000..f087f998ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "Jobs_Delete", + "title": "Delete Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json new file mode 100644 index 0000000000..105ea46a11 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetAutoMlJob.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "30a01c8b-9d69-4924-8a14-63a1fbd78f3a": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "9c4f5d89-ed21-42e3-9263-246633ca4a50": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Scheduled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:19", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:19", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get AutoML Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json new file mode 100644 index 0000000000..fb59a2e59d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetCommandJob.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "049b85fe-425d-4ec6-b194-85c0f2771fe5": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Spot", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "a2da3516-d5bf-4e6f-a220-463602afc87c": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get Command Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json new file mode 100644 index 0000000000..fe498e8ab1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetPipelineJob.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get Pipeline Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json new file mode 100644 index 0000000000..e9935edff8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Get_GetSweepJob.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "parameters": { + "92ae6a47-dc8b-407a-88d1-2e8a1932e15a": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "81750226-212a-41d5-b3c3-d6ba8a48ed6e": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Preparing", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:24", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:24", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Get", + "title": "Get Sweep Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json new file mode 100644 index 0000000000..811a76aca1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListAutoMlJob.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "assetName": "string", + "jobType": "string", + "listViewType": "All", + "resourceGroupName": "test-rg", + "scheduleId": "string", + "scheduled": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "1a89709e-1af8-41de-99c1-0349bd20e005": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Spot", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "4e53b3df-bd02-42d1-a3cd-ee4678c0b79f": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Failed", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:22", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:22", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List AutoML Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json new file mode 100644 index 0000000000..0ffc703430 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListCommandJob.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "assetName": "string", + "jobType": "string", + "listViewType": "ActiveOnly", + "resourceGroupName": "test-rg", + "scheduleId": "string", + "scheduled": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCancelled" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "ReadWriteMount", + "uri": "string" + } + }, + "parameters": { + "13a3c675-c28b-4143-807e-fde07ad06a01": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Basic", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "47f85ca1-a889-4417-a451-2ebca543e605": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Failed", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:23", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:23", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List Command Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json new file mode 100644 index 0000000000..2946f136fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListPipelineJob.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "jobType": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "computeId": "string", + "displayName": "string", + "experimentName": "string", + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "jobType": "Pipeline", + "outputs": { + "string": { + "description": "string", + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "properties": { + "string": "string" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "settings": {}, + "status": "NotStarted", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List Pipeline Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json new file mode 100644 index 0000000000..d0932c0236 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_List_ListSweepJob.json @@ -0,0 +1,138 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "assetName": "string", + "jobType": "string", + "listViewType": "ActiveOnly", + "resourceGroupName": "test-rg", + "scheduleId": "string", + "scheduled": false, + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tag": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Disabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobFailed" + ], + "emails": [ + "string" + ] + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "jobOutputType": "uri_file", + "mode": "Direct", + "uri": "string" + } + }, + "parameters": { + "ed0b17ef-7461-4e01-92bb-376554a4ee87": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "properties": { + "string": { + "0a76565a-7e17-45ce-bdea-0548a617ce27": null + } + }, + "shmSize": "2g" + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Running", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:25", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:25", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Jobs_List", + "title": "List Sweep Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json new file mode 100644 index 0000000000..d63996a8fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Jobs_Update.json @@ -0,0 +1,156 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "notificationSetting": { + "webhooks": { + "string": { + "eventType": "string", + "webhookType": "AzureDevOps" + } + } + } + } + }, + "id": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "autologgerSettings": { + "mlflowAutologger": "Enabled" + }, + "codeId": "string", + "command": "string", + "componentId": "string", + "computeId": "string", + "displayName": "string", + "distribution": { + "distributionType": "TensorFlow", + "parameterServerCount": 1, + "workerCount": 1 + }, + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "experimentName": "string", + "identity": { + "identityType": "AMLToken" + }, + "inputs": { + "string": { + "description": "string", + "jobInputType": "literal", + "value": "string" + } + }, + "isArchived": false, + "jobType": "Command", + "limits": { + "jobLimitsType": "Command", + "timeout": "PT5M" + }, + "notificationSetting": { + "emailOn": [ + "JobCompleted" + ], + "emails": [ + "string" + ], + "webhooks": { + "string": { + "eventType": "string", + "webhookType": "AzureDevOps" + } + } + }, + "outputs": { + "string": { + "description": "string", + "assetName": "string", + "assetVersion": "string", + "autoDeleteSetting": { + "condition": "CreatedGreaterThan", + "value": "string" + }, + "jobOutputType": "uri_file", + "mode": "Upload", + "uri": "string" + } + }, + "parameters": { + "6f851dd9-5a2d-4bd7-8a67-3b0e6a075bdb": null + }, + "properties": { + "string": "string" + }, + "queueSettings": { + "jobTier": "Premium", + "priority": 1 + }, + "resources": { + "dockerArgs": "string", + "instanceCount": 1, + "instanceType": "string", + "locations": [ + "string" + ], + "maxInstanceCount": 1, + "properties": { + "string": { + "00cac5bf-6a80-4db4-9c7f-1feebe8c21c8": null + } + }, + "shmSize": "2g" + }, + "secretsConfiguration": { + "string": { + "uri": null, + "workspaceSecretName": "string" + } + }, + "services": { + "string": { + "endpoint": "string", + "errorMessage": "string", + "jobServiceType": "string", + "nodes": { + "nodesValueType": "All" + }, + "port": 1, + "properties": { + "string": "string" + }, + "status": "string" + } + }, + "status": "Canceled", + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:44", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:44", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Jobs_Update", + "title": "Update Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json new file mode 100644 index 0000000000..8d740177fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_CreateOrUpdate.json @@ -0,0 +1,244 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + }, + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "LabelingJobs_CreateOrUpdate", + "title": "CreateOrUpdate Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json new file mode 100644 index 0000000000..c8ae638d45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "LabelingJobs_Delete", + "title": "Delete Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json new file mode 100644 index 0000000000..4ead918a34 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_ExportLabels.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "format": "Dataset" + }, + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "format": "Dataset", + "endDateTime": "2021-02-08T23:34:40.730Z", + "exportedRowCount": 0, + "labelingJobId": "string", + "startDateTime": "2021-02-08T23:34:40.730Z" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "LabelingJobs_ExportLabels", + "title": "ExportLabels Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json new file mode 100644 index 0000000000..8361187d89 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Get.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "includeJobInstructions": true, + "includeLabelCategories": true, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "LabelingJobs_Get", + "title": "Get Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json new file mode 100644 index 0000000000..7e453318f7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_List.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "$skipToken": "skiptoken", + "api-version": "2023-06-01-preview", + "count": "10", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextlink", + "value": [ + { + "name": "testLabelingJob", + "type": "Microsoft.MachineLearningServices/workspaces/labelingJobs", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/labelingJobs/testLabelingJob", + "properties": { + "description": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "jobInstructions": { + "uri": "link/to/instructions" + }, + "jobType": "Labeling", + "labelCategories": { + "myCategory1": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory1Title", + "multiSelect": "Disabled" + }, + "myCategory2": { + "classes": { + "myLabelClass1": { + "displayName": "myLabelClass1", + "subclasses": {} + }, + "myLabelClass2": { + "displayName": "myLabelClass2", + "subclasses": {} + } + }, + "displayName": "myCategory2Title", + "multiSelect": "Disabled" + } + }, + "labelingJobMediaProperties": { + "mediaType": "Image" + }, + "mlAssistConfiguration": { + "inferencingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/myscoringcompute", + "mlAssist": "Enabled", + "trainingComputeBinding": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/computes/mytrainingompute" + }, + "progressMetrics": { + "completedDatapointCount": 0, + "incrementalDataLastRefreshDateTime": "2020-12-08T01:23:37.234Z", + "skippedDatapointCount": 0, + "totalDatapointCount": 0 + }, + "projectId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "status": "NotStarted", + "statusMessages": [ + { + "code": "string", + "createdDateTime": "2020-12-08T01:23:37.234Z", + "level": "Error", + "message": "string" + } + ], + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-08T01:23:37.235Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-08T01:23:37.235Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "LabelingJobs_List", + "title": "List Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json new file mode 100644 index 0000000000..c7336f56b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Pause.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {} + }, + "operationId": "LabelingJobs_Pause", + "title": "Pause Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json new file mode 100644 index 0000000000..cee3ed086a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/LabelingJobs_Resume.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "id": "testLabelingJob", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "LabelingJobs_Resume", + "title": "Resume Labeling Job." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json new file mode 100644 index 0000000000..742271c993 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkProvisions_ProvisionManagedNetwork.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "includeSpark": false + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "sparkReady": true, + "status": "Active" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "ManagedNetworkProvisions_ProvisionManagedNetwork", + "title": "Provision ManagedNetwork" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json new file mode 100644 index 0000000000..8b6d22ce04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_CreateOrUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "type": "FQDN", + "category": "UserDefined", + "destination": "some_string", + "status": "Active" + } + }, + "resourceGroupName": "test-rg", + "ruleName": "some_string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "UserDefined", + "destination": "some_string", + "status": "Active" + } + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "ManagedNetworkSettingsRule_CreateOrUpdate", + "title": "CreateOrUpdate ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json new file mode 100644 index 0000000000..f920ee0a78 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "ruleName": "some_string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "ManagedNetworkSettingsRule_Delete", + "title": "Delete ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json new file mode 100644 index 0000000000..63cbeaa006 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "ruleName": "some_string", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "UserDefined", + "destination": "some_string", + "status": "Active" + } + }, + "headers": {} + } + }, + "operationId": "ManagedNetworkSettingsRule_Get", + "title": "Get ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json new file mode 100644 index 0000000000..6442327a76 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/ManagedNetworkSettingsRule_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "Required", + "destination": "some_string", + "status": "Inactive" + } + }, + { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "type": "FQDN", + "category": "Required", + "destination": "some_string", + "status": "Inactive" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "ManagedNetworkSettingsRule_List", + "title": "List ManagedNetworkSettingsRule" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json new file mode 100644 index 0000000000..b191e9fec6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateKubernetesOnlineDeployment.json @@ -0,0 +1,246 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_CreateOrUpdate", + "title": "CreateOrUpdate Kubernetes Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json new file mode 100644 index 0000000000..026f63927a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_CreateOrUpdate_CreateOrUpdateManagedOnlineDeployment.json @@ -0,0 +1,231 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_CreateOrUpdate", + "title": "CreateOrUpdate Managed Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json new file mode 100644 index 0000000000..5c4f629cab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeployment", + "endpointName": "testEndpoint", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace123" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "OnlineDeployments_Delete", + "title": "Delete Workspace Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json new file mode 100644 index 0000000000..3ea8b51160 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_GetLogs.json @@ -0,0 +1,23 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "containerType": "StorageInitializer", + "tail": 0 + }, + "deploymentName": "testDeployment", + "endpointName": "testEndpoint", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace123" + }, + "responses": { + "200": { + "body": { + "content": "string" + } + } + }, + "operationId": "OnlineDeployments_GetLogs", + "title": "Get Online Deployment Logs." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json new file mode 100644 index 0000000000..ddf2d7256d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetKubernetesOnlineDeployment.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_Get", + "title": "Get Kubernetes Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json new file mode 100644 index 0000000000..63417542f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Get_GetManagedOnlineDeployment.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_Get", + "title": "Get Managed Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json new file mode 100644 index 0000000000..dcc730ad04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_List.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_List", + "title": "List Online Deployments." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json new file mode 100644 index 0000000000..69bb8c9541 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListKubernetesOnlineDeploymentSkus.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "Automatic" + }, + "resourceType": "Microsoft.MachineLearning.Services/endpoints/deployments", + "sku": { + "name": "string", + "tier": "Free" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_ListSkus", + "title": "List Kubernetes Online Deployment Skus." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json new file mode 100644 index 0000000000..67ed12587d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_ListSkus_ListManagedOnlineDeploymentSkus.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "count": 1, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "capacity": { + "default": 1, + "maximum": 1, + "minimum": 1, + "scaleType": "Automatic" + }, + "resourceType": "Microsoft.MachineLearning.Services/endpoints/deployments", + "sku": { + "name": "string", + "tier": "Free" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineDeployments_ListSkus", + "title": "List Managed Online Deployment Skus." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json new file mode 100644 index 0000000000..63b21ad6e0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateKubernetesOnlineDeployment.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "containerResourceRequirements": { + "containerResourceLimits": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + }, + "containerResourceRequests": { + "cpu": "\"1\"", + "gpu": "\"1\"", + "memory": "\"2Gi\"" + } + }, + "endpointComputeType": "Kubernetes", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "OnlineDeployments_Update", + "title": "Update Kubernetes Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json new file mode 100644 index 0000000000..3739adb3fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineDeployments_Update_UpdateManagedOnlineDeployment.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "deploymentName": "testDeploymentName", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "appInsightsEnabled": false, + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "endpointComputeType": "Managed", + "environmentId": "string", + "environmentVariables": { + "string": "string" + }, + "instanceType": "string", + "livenessProbe": { + "failureThreshold": 1, + "initialDelay": "PT5M", + "period": "PT5M", + "successThreshold": 1, + "timeout": "PT5M" + }, + "model": "string", + "modelMountPath": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "readinessProbe": { + "failureThreshold": 30, + "initialDelay": "PT1S", + "period": "PT10S", + "successThreshold": 1, + "timeout": "PT2S" + }, + "requestSettings": { + "maxConcurrentRequestsPerInstance": 1, + "maxQueueWait": "PT5M", + "requestTimeout": "PT5M" + }, + "scaleSettings": { + "scaleType": "Default" + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "OnlineDeployments_Update", + "title": "Update Managed Online Deployment." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json new file mode 100644 index 0000000000..24b4db7ab6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_CreateOrUpdate.json @@ -0,0 +1,144 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_CreateOrUpdate", + "title": "CreateOrUpdate Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json new file mode 100644 index 0000000000..a5f50484db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "OnlineEndpoints_Delete", + "title": "Delete Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json new file mode 100644 index 0000000000..123c6b43fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Get.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_Get", + "title": "Get Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json new file mode 100644 index 0000000000..f650aaafc6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_GetToken.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "accessToken": "string", + "expiryTimeUtc": 1, + "refreshAfterTimeUtc": 1, + "tokenType": "string" + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_GetToken", + "title": "GetToken Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json new file mode 100644 index 0000000000..f458581546 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_List.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "name": "string", + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "computeType": "Managed", + "count": 1, + "orderBy": "CreatedAtDesc", + "properties": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_List", + "title": "List Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json new file mode 100644 index 0000000000..7f70965758 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_ListKeys.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "primaryKey": "string", + "secondaryKey": "string" + }, + "headers": {} + } + }, + "operationId": "OnlineEndpoints_ListKeys", + "title": "ListKeys Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json new file mode 100644 index 0000000000..c75d1d82da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_RegenerateKeys.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "keyType": "Primary", + "keyValue": "string" + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus...", + "Location": "https://management.azure.com/subscriptions/...pathToOperationResult..." + } + } + }, + "operationId": "OnlineEndpoints_RegenerateKeys", + "title": "RegenerateKeys Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json new file mode 100644 index 0000000000..aa3b0eedda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/OnlineEndpoints_Update.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "tags": {} + }, + "endpointName": "testEndpointName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "description": "string", + "authMode": "AMLToken", + "compute": "string", + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "scoringUri": "https://www.contoso.com/example", + "swaggerUri": "https://www.contoso.com/example", + "traffic": { + "string": 1 + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "OnlineEndpoints_Update", + "title": "Update Workspace Online Endpoint." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json new file mode 100644 index 0000000000..a573975c29 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_CreateOrUpdate.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "status": "Approved" + } + } + }, + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_CreateOrUpdate", + "title": "WorkspacePutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..3508cf7e0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "WorkspacePutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..f6f4408154 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "WorkspaceGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json new file mode 100644 index 0000000000..e0c4fa243a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateEndpointConnections_List.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_List", + "title": "StorageAccountListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json new file mode 100644 index 0000000000..2fb3fec515 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/PrivateLinkResources_List.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "monitor": "true", + "resourceGroupName": "rg-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "amlworkspace", + "type": "Microsoft.MachineLearningServices/workspaces/privateLinkResources", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateLinkResources/amlworkspace", + "properties": { + "groupId": "amlworkspace", + "requiredMembers": [ + "default" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_List", + "title": "WorkspaceListPrivateLinkResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json new file mode 100644 index 0000000000..6d36d6fc0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_CreateOrUpdate.json @@ -0,0 +1,280 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "None", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:38", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:38", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "Registries_CreateOrUpdate", + "title": "CreateOrUpdate Registry with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json new file mode 100644 index 0000000000..844532d746 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location", + "Retry-After": 100 + } + }, + "204": {} + }, + "operationId": "Registries_Delete", + "title": "Delete Registry." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json new file mode 100644 index 0000000000..f1290b304d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Get.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:40", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:40", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "Registries_Get", + "title": "Get Registry with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json new file mode 100644 index 0000000000..6b55055fa5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_List.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:40", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:40", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "Registries_List", + "title": "List registries with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json new file mode 100644 index 0000000000..032d596eea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_ListBySubscription.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + } + ] + }, + "headers": {} + } + }, + "operationId": "Registries_ListBySubscription", + "title": "List registries by subscription." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json new file mode 100644 index 0000000000..05bcee768a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_RemoveRegions.json @@ -0,0 +1,190 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "None", + "userAssignedIdentities": { + "string": {} + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "tags": {} + }, + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:01", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:01", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location", + "Retry-After": 100 + } + } + }, + "operationId": "Registries_RemoveRegions", + "title": "Remove regions from registry" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json new file mode 100644 index 0000000000..9d2950534a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Registries_Update.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned", + "userAssignedIdentities": { + "string": {} + } + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Basic" + }, + "tags": {} + }, + "registryName": "string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "string": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "kind": "string", + "location": "string", + "properties": { + "discoveryUrl": "string", + "intellectualPropertyPublisher": "string", + "managedResourceGroup": { + "resourceId": "string" + }, + "mlFlowRegistryUri": "string", + "privateEndpointConnections": [ + { + "id": "string", + "location": "string", + "properties": { + "groupIds": [ + "string" + ], + "privateEndpoint": { + "id": "string", + "subnetArmId": "string" + }, + "privateLinkServiceConnectionState": { + "description": "string", + "actionsRequired": "string", + "status": "Approved" + }, + "provisioningState": "string" + } + } + ], + "publicNetworkAccess": "string", + "regionDetails": [ + { + "acrDetails": [ + { + "systemCreatedAcrAccount": { + "acrAccountName": "string", + "acrAccountSku": "string", + "armResourceId": { + "resourceId": "string" + } + } + } + ], + "location": "string", + "storageAccountDetails": [ + { + "systemCreatedStorageAccount": { + "allowBlobPublicAccess": false, + "armResourceId": { + "resourceId": "string" + }, + "storageAccountHnsEnabled": false, + "storageAccountName": "string", + "storageAccountType": "string" + } + } + ] + } + ] + }, + "sku": { + "name": "string", + "capacity": 1, + "family": "string", + "size": "string", + "tier": "Free" + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:02", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:02", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + }, + "tags": {} + }, + "headers": {} + } + }, + "operationId": "Registries_Update", + "title": "Update Registry with system created accounts." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..aa39067926 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_CreateOrUpdate.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "codeName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryCodeContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json new file mode 100644 index 0000000000..08f316d8a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryCodeContainers_Delete", + "title": "Delete Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json new file mode 100644 index 0000000000..0ff281f4b2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testworkspace/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-08-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryCodeContainers_Get", + "title": "Get Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json new file mode 100644 index 0000000000..cf525178f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeContainers_List.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "$skipToken": "skiptoken", + "api-version": "2023-06-01-preview", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-08-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-08-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + }, + { + "name": "testContainer2", + "type": "Microsoft.MachineLearningServices/registries/codes", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/codes/testContainer2", + "properties": { + "description": "string", + "tags": { + "property1": "string", + "property2": "string" + } + }, + "systemData": { + "createdAt": "2020-08-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-08-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "RegistryCodeContainers_List", + "title": "List Registry Code Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json new file mode 100644 index 0000000000..83b46d7a38 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrGetStartPendingUpload.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "codeName": "string", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "blobReferenceForConsumption": { + "blobUri": "https://www.contoso.com/example", + "credential": { + "credentialType": "SAS", + "sasUri": "https://www.contoso.com/example" + }, + "storageAccountArmId": "string" + }, + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_CreateOrGetStartPendingUpload", + "title": "CreateOrGetStartPendingUpload Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..ef785e34fe --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_CreateOrUpdate.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json new file mode 100644 index 0000000000..85d109592b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryCodeVersions_Delete", + "title": "Delete Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json new file mode 100644 index 0000000000..993ad3bc88 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_Get.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_Get", + "title": "Get Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json new file mode 100644 index 0000000000..983e114019 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryCodeVersions_List.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "codeName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "codeUri": "https://blobStorage/folderName", + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryCodeVersions_List", + "title": "List Registry Code Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..cd3e797313 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_CreateOrUpdate.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json new file mode 100644 index 0000000000..a85d440f8a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryComponentContainers_Delete", + "title": "Delete Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json new file mode 100644 index 0000000000..f5e4a1962a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_Get.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentContainers_Get", + "title": "Get Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json new file mode 100644 index 0000000000..5ab76243c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentContainers_List.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "componentName": "testContainer", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryComponentContainers_List", + "title": "List Registry Component Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..8267b5ab42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_CreateOrUpdate.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "componentSpec": { + "8ced901b-d826-477d-bfef-329da9672513": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "2de2e74e-457d-4447-a581-933abc2b9d96": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "a6c1349d-5e45-48da-92c3-3ce176cb30e9": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json new file mode 100644 index 0000000000..2ab88b1996 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryComponentVersions_Delete", + "title": "Delete Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json new file mode 100644 index 0000000000..c9adab841b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_Get.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "1a7c40b5-2029-4f5f-a8d6-fd0822038773": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryComponentVersions_Get", + "title": "Get Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json new file mode 100644 index 0000000000..4dd54447bb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryComponentVersions_List.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "componentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "componentSpec": { + "50acbce5-cccc-475a-8ac6-c4da402afbd8": null + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryComponentVersions_List", + "title": "List Registry Component Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..c56e4bbdda --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_CreateOrUpdate.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "dataType": "uri_folder", + "isArchived": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "uri_folder", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json new file mode 100644 index 0000000000..bb23ecaae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryDataContainers_Delete", + "title": "Delete Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json new file mode 100644 index 0000000000..c5d58db0f9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_Get.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "uri_file", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:14", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:14", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataContainers_Get", + "title": "Get Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json new file mode 100644 index 0000000000..a5bcb8972e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataContainers_List.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "listViewType": "All", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "uri_folder", + "isArchived": false, + "latestVersion": "string", + "nextVersion": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:15", + "createdBy": "string", + "createdByType": "Application", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:15", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryDataContainers_List", + "title": "RegistryList Registry Data Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json new file mode 100644 index 0000000000..8b75f9284c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrGetStartPendingUpload.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "blobReferenceForConsumption": { + "blobUri": "https://www.contoso.com/example", + "credential": { + "credentialType": "SAS", + "sasUri": "https://www.contoso.com/example" + }, + "storageAccountArmId": "string" + }, + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_CreateOrGetStartPendingUpload", + "title": "CreateOrGetStartPendingUpload Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..eb421120a6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_CreateOrUpdate.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + } + }, + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:13", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:13", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:13", + "createdBy": "string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:13", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json new file mode 100644 index 0000000000..d4f589166a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryDataVersions_Delete", + "title": "Delete Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json new file mode 100644 index 0000000000..a2ae6abc3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_Get.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:14", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:14", + "lastModifiedBy": "string", + "lastModifiedByType": "ManagedIdentity" + } + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_Get", + "title": "Get Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json new file mode 100644 index 0000000000..046378130c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryDataVersions_List.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "name": "string", + "$orderBy": "string", + "$skipToken": "string", + "$tags": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "listViewType": "ArchivedOnly", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "dataType": "mltable", + "dataUri": "string", + "isAnonymous": false, + "isArchived": false, + "properties": { + "string": "string" + }, + "referencedUris": [ + "string" + ], + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999+00:48", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999+00:48", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryDataVersions_List", + "title": "RegistryList Registry Data Version Base." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..1dbd5b1050 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_CreateOrUpdate.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + } + }, + "environmentName": "testEnvironment", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-04T03:39:11.300Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-04T03:39:11.300Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "properties": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + }, + "tags": { + "additionalProp1": "string", + "additionalProp2": "string", + "additionalProp3": "string" + } + }, + "systemData": { + "createdAt": "2020-12-04T03:39:11.301Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-12-04T03:39:11.301Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryEnvironmentContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json new file mode 100644 index 0000000000..5b35a7ae21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryEnvironmentContainers_Delete", + "title": "Delete Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json new file mode 100644 index 0000000000..c9e9f26af7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "testEnvironment", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryEnvironmentContainers_Get", + "title": "Get Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json new file mode 100644 index 0000000000..f910fb99db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentContainers_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "$skipToken": "skiptoken", + "api-version": "2023-06-01-preview", + "environmentName": "testContainer", + "registryName": "testregistry", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "testEnvironment", + "type": "Microsoft.MachineLearningServices/registries/environments", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/testregistry/environments/testEnvironment", + "properties": { + "description": "string", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "RegistryEnvironmentContainers_List", + "title": "List Registry Environment Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..2fdc0fd8e7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_CreateOrUpdate.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "environmentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryEnvironmentVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json new file mode 100644 index 0000000000..a53b2255a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryEnvironmentVersions_Delete", + "title": "Delete Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json new file mode 100644 index 0000000000..1060bcb981 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_Get.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "environmentName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryEnvironmentVersions_Get", + "title": "Get Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json new file mode 100644 index 0000000000..85d6d4f293 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryEnvironmentVersions_List.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "environmentName": "string", + "registryName": "my-aml-regsitry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "build": { + "contextUri": "https://storage-account.blob.core.windows.net/azureml/DockerBuildContext/95ddede6b9b8c4e90472db3acd0a8d28/", + "dockerfilePath": "prod/Dockerfile" + }, + "condaFile": "string", + "environmentType": "Curated", + "image": "docker.io/tensorflow/serving:latest", + "inferenceConfig": { + "livenessRoute": { + "path": "string", + "port": 1 + }, + "readinessRoute": { + "path": "string", + "port": 1 + }, + "scoringRoute": { + "path": "string", + "port": 1 + } + }, + "isAnonymous": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryEnvironmentVersions_List", + "title": "List Registry Environment Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json new file mode 100644 index 0000000000..8e57951264 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_CreateOrUpdate.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "modelName": "testContainer", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryModelContainers_CreateOrUpdate", + "title": "CreateOrUpdate Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json new file mode 100644 index 0000000000..1730ff2ca0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Delete.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "testContainer", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryModelContainers_Delete", + "title": "Delete Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json new file mode 100644 index 0000000000..b3a29a517e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_Get.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "testContainer", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + } + }, + "operationId": "RegistryModelContainers_Get", + "title": "Get Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json new file mode 100644 index 0000000000..4b82b34518 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelContainers_List.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "name": "testContainer", + "api-version": "2023-06-01-preview", + "registryName": "registry123", + "resourceGroupName": "testrg123", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextlink", + "value": [ + { + "name": "testContainer", + "type": "Microsoft.MachineLearningServices/registries/models", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg123/providers/Microsoft.MachineLearningServices/registries/registry123/models/testContainer", + "properties": { + "description": "Model container description", + "tags": { + "tag1": "value1", + "tag2": "value2" + } + }, + "systemData": { + "createdAt": "2020-12-01T12:00:00.000Z", + "createdBy": "John Smith", + "createdByType": "User", + "lastModifiedAt": "2020-12-01T12:00:00.000Z", + "lastModifiedBy": "John Smith", + "lastModifiedByType": "User" + } + } + ] + } + } + }, + "operationId": "RegistryModelContainers_List", + "title": "List Registry Model Container." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json new file mode 100644 index 0000000000..4795084c9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrGetStartPendingUpload.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "pendingUploadId": "string", + "pendingUploadType": "None" + }, + "modelName": "string", + "registryName": "registryName", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "blobReferenceForConsumption": { + "blobUri": "https://www.contoso.com/example", + "credential": { + "credentialType": "SAS", + "sasUri": "https://www.contoso.com/example" + }, + "storageAccountArmId": "string" + }, + "pendingUploadId": "string", + "pendingUploadType": "TemporaryBlobReference" + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_CreateOrGetStartPendingUpload", + "title": "CreateOrGetStartPendingUpload Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json new file mode 100644 index 0000000000..686ee5c0c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_CreateOrUpdate.json @@ -0,0 +1,105 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + } + }, + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_CreateOrUpdate", + "title": "CreateOrUpdate Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json new file mode 100644 index 0000000000..8dd1ad6d28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "RegistryModelVersions_Delete", + "title": "Delete Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json new file mode 100644 index 0000000000..a70b09e1f0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_Get", + "title": "Get Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json new file mode 100644 index 0000000000..67129f9bc4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "description": "string", + "$orderBy": "string", + "$skipToken": "string", + "$top": 1, + "api-version": "2023-06-01-preview", + "modelName": "string", + "offset": 1, + "properties": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "tags": "string", + "version": "string" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "flavors": { + "string": { + "data": { + "string": "string" + } + } + }, + "isAnonymous": false, + "modelType": "CustomModel", + "modelUri": "string", + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "User", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "RegistryModelVersions_List", + "title": "List Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json new file mode 100644 index 0000000000..5de971e6a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/RegistryModelVersions_Package.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "baseEnvironmentSource": { + "baseEnvironmentSourceType": "EnvironmentAsset", + "resourceId": "string" + }, + "environmentVariables": { + "string": "string" + }, + "inferencingServer": { + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "serverType": "AzureMLBatch" + }, + "inputs": [ + { + "path": { + "inputPathType": "Url", + "url": "string" + }, + "inputType": "UriFile", + "mode": "Download", + "mountPath": "string" + } + ], + "modelConfiguration": { + "mode": "ReadOnlyMount", + "mountPath": "string" + }, + "tags": { + "string": "string" + }, + "targetEnvironmentId": "string" + }, + "modelName": "string", + "registryName": "my-aml-registry", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "version": "string" + }, + "responses": { + "200": { + "body": { + "baseEnvironmentSource": { + "baseEnvironmentSourceType": "EnvironmentAsset", + "resourceId": "string" + }, + "buildId": "string", + "buildState": "NotStarted", + "environmentVariables": { + "string": "string" + }, + "inferencingServer": { + "codeConfiguration": { + "codeId": "string", + "scoringScript": "string" + }, + "serverType": "AzureMLBatch" + }, + "inputs": [ + { + "path": { + "inputPathType": "Url", + "url": "string" + }, + "inputType": "UriFile", + "mode": "Download", + "mountPath": "string" + } + ], + "logUrl": "string", + "modelConfiguration": { + "mode": "ReadOnlyMount", + "mountPath": "string" + }, + "tags": { + "string": "string" + }, + "targetEnvironmentId": "string" + }, + "headers": {} + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "RegistryModelVersions_Package", + "title": "Package Registry Model Version." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json new file mode 100644 index 0000000000..2b52f358c0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_CreateOrUpdate.json @@ -0,0 +1,121 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "9965593e-526f-4b89-bb36-761138cf2794": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + } + }, + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "d77a9a9a-4bb5-4c0c-8a77-459be8b82b9f": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Succeeded", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "13ea51e0-ff28-49c3-a85d-9b5199eb14e5": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Failed", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "Schedules_CreateOrUpdate", + "title": "CreateOrUpdate Schedule." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json new file mode 100644 index 0000000000..e62b0112a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Delete.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/...pathToOperationStatus...", + "Location": "https://management.azure.com/subscriptions/...pathToOperationResult..." + } + }, + "204": {} + }, + "operationId": "Schedules_Delete", + "title": "Delete Schedule." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json new file mode 100644 index 0000000000..630a426741 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_Get.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "name": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "a108545b-def1-4c86-8e53-dbcb1de3a8bc": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Creating", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Key" + } + }, + "headers": {} + } + }, + "operationId": "Schedules_Get", + "title": "Get Schedule." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json new file mode 100644 index 0000000000..d140b0446d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Schedules_List.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "$skipToken": "string", + "api-version": "2023-06-01-preview", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "my-aml-workspace" + }, + "responses": { + "200": { + "body": { + "nextLink": "string", + "value": [ + { + "name": "string", + "type": "string", + "id": "string", + "properties": { + "description": "string", + "action": { + "actionType": "InvokeBatchEndpoint", + "endpointInvocationDefinition": { + "00cd1396-a094-4d48-8d86-14c43a55a6af": null + } + }, + "displayName": "string", + "isEnabled": false, + "properties": { + "string": "string" + }, + "provisioningState": "Deleting", + "tags": { + "string": "string" + }, + "trigger": { + "endTime": "string", + "expression": "string", + "startTime": "string", + "timeZone": "string", + "triggerType": "Cron" + } + }, + "systemData": { + "createdAt": "2020-01-01T12:34:56.999Z", + "createdBy": "string", + "createdByType": "Key", + "lastModifiedAt": "2020-01-01T12:34:56.999Z", + "lastModifiedBy": "string", + "lastModifiedByType": "Application" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "Schedules_List", + "title": "List Schedules." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json new file mode 100644 index 0000000000..bc7f1119fc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Create.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "authType": "None", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + }, + "connectionName": "connection-1", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace-1" + }, + "responses": { + "200": { + "body": { + "name": "connection-1", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1", + "properties": { + "authType": "None", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + } + } + }, + "operationId": "WorkspaceConnections_Create", + "title": "CreateWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json new file mode 100644 index 0000000000..c3f4457977 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "connectionName": "connection-1", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace-1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "WorkspaceConnections_Delete", + "title": "DeleteWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json new file mode 100644 index 0000000000..e5d5acb084 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "connectionName": "connection-1", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "workspace-1" + }, + "responses": { + "200": { + "body": { + "name": "connection-1", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/connections/connection-1", + "properties": { + "authType": "None", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + } + } + }, + "operationId": "WorkspaceConnections_Get", + "title": "GetWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json new file mode 100644 index 0000000000..13818c2aca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "category": "ContainerRegistry", + "resourceGroupName": "resourceGroup-1", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "target": "www.facebook.com", + "workspaceName": "workspace-1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "connection-1", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/linkedWorkspaces/connection-1", + "properties": { + "authType": "PAT", + "category": "ContainerRegistry", + "expiryTime": "2024-03-15T14:30:00Z", + "target": "www.facebook.com" + } + }, + { + "name": "connection-2", + "type": "Microsoft.MachineLearningServices/workspaces/connections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup-1/providers/Microsoft.MachineLearningServices/workspaces/workspace-1/linkedWorkspaces/connection-2", + "properties": { + "authType": "PAT", + "category": "ContainerRegistry", + "target": "www.facebook.com" + } + } + ] + } + } + }, + "operationId": "WorkspaceConnections_List", + "title": "ListWorkspaceConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json new file mode 100644 index 0000000000..45d686ffa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_ListSecrets.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "connectionName": "some_string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "authType": "AccessKey", + "category": "CustomKeys", + "credentials": { + "accessKeyId": "some_string", + "secretAccessKey": "some_string" + }, + "expiryTime": "2020-01-01T00:00:00Z", + "metadata": {}, + "target": "some_string" + }, + "systemData": { + "createdAt": "2020-01-01T00:00:00Z", + "createdBy": "some_string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T00:00:00Z", + "lastModifiedBy": "some_string", + "lastModifiedByType": "User" + } + }, + "headers": {} + } + }, + "operationId": "WorkspaceConnections_ListSecrets", + "title": "GetWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json new file mode 100644 index 0000000000..1b325739f2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceConnections_Update.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "authType": "AccessKey", + "category": "ADLSGen2", + "credentials": { + "accessKeyId": "some_string", + "secretAccessKey": "some_string" + }, + "expiryTime": "2020-01-01T00:00:00Z", + "metadata": {}, + "target": "some_string" + } + }, + "connectionName": "some_string", + "resourceGroupName": "test-rg", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "aml-workspace-name" + }, + "responses": { + "200": { + "body": { + "name": "some_string", + "type": "some_string", + "id": "some_string", + "properties": { + "authType": "AccessKey", + "category": "ADLSGen2", + "credentials": { + "accessKeyId": "some_string", + "secretAccessKey": "some_string" + }, + "expiryTime": "2020-01-01T00:00:00Z", + "metadata": {}, + "target": "some_string" + }, + "systemData": { + "createdAt": "2020-01-01T00:00:00Z", + "createdBy": "some_string", + "createdByType": "ManagedIdentity", + "lastModifiedAt": "2020-01-01T00:00:00Z", + "lastModifiedBy": "some_string", + "lastModifiedByType": "Application" + } + }, + "headers": {} + } + }, + "operationId": "WorkspaceConnections_Update", + "title": "UpdateWorkspaceConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json new file mode 100644 index 0000000000..acd8291dc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/WorkspaceFeatures_List.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "myResourceGroup", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "description": "Create, edit or delete AutoML experiments in the SDK", + "displayName": "Create edit experiments UI", + "id": "automatedml_createeditexperimentsui" + }, + { + "description": "Upgrade workspace from Basic to enterprise from the UI", + "displayName": "Upgrade workspace UI", + "id": "workspace_upgradeworkspaceui" + } + ] + } + } + }, + "operationId": "WorkspaceFeatures_List", + "title": "List Workspace features" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json new file mode 100644 index 0000000000..6f31d63627 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_CreateOrUpdate.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "identity": { + "type": "SystemAssigned,UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": {} + } + }, + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" + }, + "keyVaultProperties": { + "identityClientId": "", + "keyIdentifier": "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", + "keyVaultArmId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" + }, + "status": "Enabled" + }, + "friendlyName": "HelloName", + "hbiWorkspace": false, + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "sharedPrivateLinkResources": [ + { + "name": "testdbresource", + "properties": { + "groupId": "Sql", + "privateLinkResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql", + "requestMessage": "Please approve", + "status": "Approved" + } + } + ], + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + }, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "location": "eastus2euap", + "properties": { + "description": "test description", + "allowPublicAccessWhenBehindVnet": false, + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "enableDataIsolation": false, + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" + }, + "keyVaultProperties": { + "identityClientId": "", + "keyIdentifier": "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", + "keyVaultArmId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" + }, + "status": "Enabled" + }, + "friendlyName": "HelloName", + "hbiWorkspace": false, + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "publicNetworkAccess": "Disabled", + "sharedPrivateLinkResources": [ + { + "name": "testdbresource", + "properties": { + "groupId": "Sql", + "privateLinkResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testdbresource/privateLinkResources/Sql", + "requestMessage": "Please approve", + "status": "Approved" + } + } + ], + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_CreateOrUpdate", + "title": "Create Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json new file mode 100644 index 0000000000..dc24fa4f96 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Delete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + }, + "204": {} + }, + "operationId": "Workspaces_Delete", + "title": "Delete Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json new file mode 100644 index 0000000000..aca8411c8d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Diagnose.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "value": { + "applicationInsights": {}, + "containerRegistry": {}, + "dnsResolution": {}, + "keyVault": {}, + "nsg": {}, + "others": {}, + "resourceLock": {}, + "storageAccount": {}, + "udr": {} + } + }, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": { + "applicationInsightsResults": [], + "containerRegistryResults": [], + "dnsResolutionResults": [ + { + "code": "CustomDNSInUse", + "level": "Warning", + "message": "We have detected an on-premise dns server is configured. Please make sure conditional forwarding is configured correctly according to doc https://foo" + } + ], + "keyVaultResults": [], + "networkSecurityRuleResults": [], + "otherResults": [], + "resourceLockResults": [], + "storageAccountResults": [], + "userDefinedRouteResults": [] + } + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_Diagnose", + "title": "Diagnose Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json new file mode 100644 index 0000000000..f084e36a49 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Get.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "identity": { + "type": "SystemAssigned,UserAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444", + "userAssignedIdentities": { + "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai": { + "clientId": "00000000-1111-2222-3333-444444444444", + "principalId": "00000000-1111-2222-3333-444444444444" + } + } + }, + "location": "eastus2euap", + "properties": { + "description": "test description", + "allowPublicAccessWhenBehindVnet": false, + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testuai" + }, + "keyVaultProperties": { + "identityClientId": "", + "keyIdentifier": "https://testkv.vault.azure.net/keys/testkey/aabbccddee112233445566778899aabb", + "keyVaultArmId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv" + }, + "status": "Enabled" + }, + "friendlyName": "HelloName", + "hbiWorkspace": false, + "imageBuildCompute": "testcompute", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "managedNetwork": { + "isolationMode": "AllowOnlyApprovedOutbound", + "networkId": "00000000-1111-2222-3333-444444444444", + "outboundRules": { + "some_string": { + "type": "FQDN", + "category": "Required", + "destination": "some_string", + "status": "Inactive" + } + }, + "status": { + "sparkReady": false, + "status": "Active" + } + }, + "privateEndpointConnections": [ + { + "name": "testprivatelinkconnection", + "type": "Microsoft.MachineLearningServices/workspaces/privateEndpointConnections", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace/privateEndpointConnections/testprivatelinkconnection", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg-1234/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionsRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ], + "privateLinkCount": 0, + "publicNetworkAccess": "Disabled", + "serviceProvisionedResourceGroup": "testworkspace_0000111122223333", + "sharedPrivateLinkResources": [ + { + "name": "testcosmosdbresource", + "properties": { + "groupId": "Sql", + "privateLinkResourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.DocumentDB/databaseAccounts/testcosmosdbresource/privateLinkResources/Sql", + "requestMessage": "Please approve", + "status": "Approved" + } + } + ], + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + } + }, + "operationId": "Workspaces_Get", + "title": "Get Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json new file mode 100644 index 0000000000..a9edefee0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListByResourceGroup.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "value": [ + { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + }, + { + "name": "testworkspace1", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace1", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistryNew", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName 1", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkvNew", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccountOld" + } + } + ] + } + } + }, + "operationId": "Workspaces_ListByResourceGroup", + "title": "Get Workspaces by Resource Group" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json new file mode 100644 index 0000000000..449b0adb06 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListBySubscription.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "subscriptionId": "00000000-1111-2222-3333-444444444444" + }, + "responses": { + "200": { + "body": { + "nextLink": "nextLink", + "value": [ + { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + }, + { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-5678/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "location": "eastus2euap", + "properties": { + "description": "test description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistryNew", + "discoveryUrl": "http://example.com", + "friendlyName": "HelloName", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkvNew", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccountOld" + } + } + ] + } + } + }, + "operationId": "Workspaces_ListBySubscription", + "title": "Get Workspaces by subscription" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json new file mode 100644 index 0000000000..bf22090168 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListKeys.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "appInsightsInstrumentationKey": null, + "containerRegistryCredentials": { + "location": null, + "passwords": [ + { + "name": "password", + "value": "" + }, + { + "name": "password2", + "value": "0KARRQoQHSUq1yViPWg7YFernOS=Ic/t" + } + ], + "username": "testdemoworkjmjmeykp" + }, + "notebookAccessKeys": { + "primaryAccessKey": null, + "secondaryAccessKey": null + }, + "userStorageArmId": "/subscriptions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee/resourceGroups/ragargeastus2euap/providers/Microsoft.Storage/storageAccounts/testdemoworkazashomr", + "userStorageKey": null + } + } + }, + "operationId": "Workspaces_ListKeys", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json new file mode 100644 index 0000000000..54914a86a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookAccessToken.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "expiresIn": 28800, + "hostName": "Host product name", + "notebookResourceId": "94350843095843059", + "publicDns": "resource.notebooks.azure.net", + "scope": "aznb_identity", + "tokenType": "Bearer" + } + } + }, + "operationId": "Workspaces_ListNotebookAccessToken", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json new file mode 100644 index 0000000000..0d88c82d04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListNotebookKeys.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "primaryAccessKey": null, + "secondaryAccessKey": null + } + } + }, + "operationId": "Workspaces_ListNotebookKeys", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json new file mode 100644 index 0000000000..fa7516cd8e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListOutboundNetworkDependenciesEndpoints.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "category": "Azure Active Directory", + "endpoints": [ + { + "domainName": "login.microsoftonline.com", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + } + }, + { + "properties": { + "category": "Azure portal", + "endpoints": [ + { + "domainName": "management.azure.com", + "endpointDetails": [ + { + "port": 443 + } + ] + } + ] + } + } + ] + } + } + }, + "operationId": "Workspaces_ListOutboundNetworkDependenciesEndpoints", + "title": "ListOutboundNetworkDependenciesEndpoints" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json new file mode 100644 index 0000000000..6ff2e9b8cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ListStorageAccountKeys.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "userStorageKey": null + } + } + }, + "operationId": "Workspaces_ListStorageAccountKeys", + "title": "List Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json new file mode 100644 index 0000000000..b81bfe63b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_PrepareNotebook.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": { + "body": { + "fqdn": "testnotebook.notebooks.azure.com", + "notebookPreparationError": { + "errorMessage": "general error", + "statusCode": 500 + }, + "resourceId": "aabbccddee112233445566778899" + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_PrepareNotebook", + "title": "Prepare Notebook" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json new file mode 100644 index 0000000000..bd12801453 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_ResyncKeys.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "resourceGroupName": "testrg123", + "subscriptionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "workspaceName": "workspaces123" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_ResyncKeys", + "title": "Resync Workspace Keys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json new file mode 100644 index 0000000000..3d998b34af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/examples/2023-06-01-preview/Workspaces_Update.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "api-version": "2023-06-01-preview", + "body": { + "properties": { + "description": "new description", + "friendlyName": "New friendly name", + "publicNetworkAccess": "Disabled" + } + }, + "resourceGroupName": "workspace-1234", + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "workspaceName": "testworkspace" + }, + "responses": { + "200": { + "body": { + "name": "testworkspace", + "type": "Microsoft.MachineLearningServices/workspaces", + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.MachineLearningServices/workspaces/testworkspace", + "identity": { + "type": "SystemAssigned", + "principalId": "00000000-1111-2222-3333-444444444444", + "tenantId": "00000000-1111-2222-3333-444444444444" + }, + "location": "eastus2euap", + "properties": { + "description": "new description", + "applicationInsights": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/microsoft.insights/components/testinsights", + "containerRegistry": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.ContainerRegistry/registries/testRegistry", + "discoveryUrl": "http://example.com", + "friendlyName": "New friendly name", + "keyVault": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/workspace-1234/providers/Microsoft.KeyVault/vaults/testkv", + "publicNetworkAccess": "Disabled", + "storageAccount": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/accountcrud-1234/providers/Microsoft.Storage/storageAccounts/testStorageAccount" + } + } + }, + "202": { + "headers": { + "Location": "example_location" + } + } + }, + "operationId": "Workspaces_Update", + "title": "Update Workspace" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp new file mode 100644 index 0000000000..09216f9f5d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/main.tsp @@ -0,0 +1,68 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; +import "./models.tsp"; +import "./ComputeResource.tsp"; +import "./CodeContainerResource.tsp"; +import "./CodeContainerResource.tsp"; +import "./CodeVersionResource.tsp"; +import "./CodeVersionResource.tsp"; +import "./ComponentContainerResource.tsp"; +import "./ComponentContainerResource.tsp"; +import "./ComponentVersionResource.tsp"; +import "./ComponentVersionResource.tsp"; +import "./DataContainerResource.tsp"; +import "./DataContainerResource.tsp"; +import "./DataVersionBaseResource.tsp"; +import "./DataVersionBaseResource.tsp"; +import "./EnvironmentContainerResource.tsp"; +import "./EnvironmentContainerResource.tsp"; +import "./EnvironmentVersionResource.tsp"; +import "./EnvironmentVersionResource.tsp"; +import "./ModelContainerResource.tsp"; +import "./ModelContainerResource.tsp"; +import "./ModelVersionResource.tsp"; +import "./ModelVersionResource.tsp"; +import "./BatchEndpointTrackedResource.tsp"; +import "./BatchDeploymentTrackedResource.tsp"; +import "./DatastoreResource.tsp"; +import "./FeaturesetContainer.tsp"; +import "./Feature.tsp"; +import "./FeaturesetVersion.tsp"; +import "./FeaturestoreEntityContainer.tsp"; +import "./FeaturestoreEntityVersion.tsp"; +import "./JobBaseResource.tsp"; +import "./LabelingJob.tsp"; +import "./OnlineEndpointTrackedResource.tsp"; +import "./OnlineDeploymentTrackedResource.tsp"; +import "./Schedule.tsp"; +import "./Registry.tsp"; +import "./Workspace.tsp"; +import "./WorkspaceConnectionPropertiesV2BasicResource.tsp"; +import "./OutboundRuleBasicResource.tsp"; +import "./PrivateEndpointConnection.tsp"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using Azure.ResourceManager; +using TypeSpec.Versioning; +@armProviderNamespace +@service({ + title: "Azure Machine Learning Services", +}) +@versioned(Versions) +@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v3) +@doc("These APIs allow end users to operate on Azure Machine Learning Workspace resources.") +namespace Azure.ResourceManager.MachineLearning; + +@doc("The available API versions.") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-06-01-preview API version.") + v2023_06_01_preview: "2023-06-01-preview", +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp new file mode 100644 index 0000000000..2416b05726 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/models.tsp @@ -0,0 +1,8774 @@ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.Core; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; + +namespace Azure.ResourceManager.MachineLearning; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("An enum describing the unit of usage measurement.") +enum UsageUnit { + Count, +} + +@doc("Three lettered code specifying the currency of the VM price. Example: USD") +enum BillingCurrency { + USD, +} + +@doc("The unit of time measurement for the specified VM price. Example: OneHour") +enum UnitOfMeasure { + OneHour, +} + +@doc("Operating system type used by the VM.") +enum VMPriceOSType { + Linux, + Windows, +} + +@doc("The type of the VM.") +enum VMTier { + Standard, + LowPriority, + Spot, +} + +@doc("An enum describing the unit of quota measurement.") +enum QuotaUnit { + Count, +} + +@doc("Status of update workspace quota.") +enum Status { + Undefined, + Success, + Failure, + InvalidQuotaBelowClusterMinimum, + InvalidQuotaExceedsSubscriptionLimit, + InvalidVMFamilyName, + OperationNotSupportedForSku, + OperationNotEnabledForRegion, +} + +@doc("Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).") +enum ManagedServiceIdentityType { + None, + SystemAssigned, + UserAssigned, + `SystemAssigned,UserAssigned`, +} + +@doc("The type of identity that created the resource.") +enum CreatedByType { + User, + Application, + ManagedIdentity, + Key, +} + +@doc("The type of compute") +enum ComputeType { + AKS, + Kubernetes, + AmlCompute, + ComputeInstance, + DataFactory, + VirtualMachine, + HDInsight, + Databricks, + DataLakeAnalytics, + SynapseSpark, +} + +@doc("The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.") +enum ProvisioningState { + Unknown, + Updating, + Creating, + Deleting, + Succeeded, + Failed, + Canceled, +} + +enum UnderlyingResourceAction { + Delete, + Detach, +} + +@doc("Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images") +enum ImageType { + docker, + azureml, +} + +@doc("Type of the Environment Variable. Possible values are: local - For local variable") +enum EnvironmentVariableType { + local, +} + +@doc("Protocol over which communication will happen over this endpoint") +enum Protocol { + tcp, + udp, + http, +} + +@doc("Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe") +enum VolumeDefinitionType { + bind, + volume, + tmpfs, + npipe, +} + +@doc("State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted.") +enum NodeState { + idle, + running, + preparing, + unusable, + leaving, + preempted, +} + +@doc("Provisioning state of registry asset.") +enum AssetProvisioningState { + Succeeded, + Failed, + Canceled, + Creating, + Updating, + Deleting, +} + +enum AutoDeleteCondition { + CreatedGreaterThan, + LastAccessedGreaterThan, +} + +@doc("Type of storage to use for the pending upload location") +enum PendingUploadType { + None, + TemporaryBlobReference, +} + +@doc("Enum to determine the PendingUpload credentials type.") +enum PendingUploadCredentialType { + SAS, +} + +enum ListViewType { + ActiveOnly, + ArchivedOnly, + All, +} + +@doc("Enum to determine the type of data.") +enum DataType { + uri_file, + uri_folder, + mltable, +} + +@doc("Protection level associated with the Intellectual Property.") +enum ProtectionLevel { + @doc("All means Intellectual Property is fully protected.") All, + @doc("None means it is not an Intellectual Property.") None, +} + +@doc("AutoRebuild setting for the derived image") +enum AutoRebuildSetting { + Disabled, + OnBaseImageUpdate, +} + +@doc("Environment type is either user created or curated by Azure ML service") +enum EnvironmentType { + Curated, + UserCreated, +} + +@doc("The type of operating system.") +enum OperatingSystemType { + Linux, + Windows, +} + +@doc("Base environment type.") +enum BaseEnvironmentSourceType { + EnvironmentAsset, +} + +@doc("Inferencing server type for various targets.") +enum InferencingServerType { + AzureMLOnline, + AzureMLBatch, + Triton, + Custom, +} + +@doc("Type of the inputs.") +enum PackageInputType { + UriFile, + UriFolder, +} + +@doc("Mounting type of the model or the inputs") +enum PackageInputDeliveryMode { + Copy, + Download, +} + +@doc("Input path type for package inputs.") +enum InputPathType { + Url, + PathId, + PathVersion, +} + +@doc("Package build state returned in package response.") +enum PackageBuildState { + NotStarted, + Running, + Succeeded, + Failed, +} + +@doc("State of endpoint provisioning.") +enum EndpointProvisioningState { + Creating, + Deleting, + Succeeded, + Failed, + Updating, + Canceled, +} + +@doc("Enum to determine endpoint authentication mode.") +enum EndpointAuthMode { + AMLToken, + Key, + AADToken, +} + +@doc("The enumerated property types for batch deployments.") +enum BatchDeploymentConfigurationType { + Model, + PipelineComponent, +} + +@doc(""" +Log verbosity for batch inferencing. +Increasing verbosity order for logging is : Warning, Info and Debug. +The default value is Info. +""") +enum BatchLoggingLevel { + Info, + Warning, + Debug, +} + +@doc("Enum to determine which reference method to use for an asset.") +enum ReferenceType { + Id, + DataPath, + OutputPath, +} + +@doc("Enum to determine how batch inferencing will handle output") +enum BatchOutputAction { + SummaryOnly, + AppendRow, +} + +@doc("Possible values for DeploymentProvisioningState.") +enum DeploymentProvisioningState { + Creating, + Deleting, + Scaling, + Updating, + Succeeded, + Failed, + Canceled, +} + +@doc("Enum to determine the datastore credentials type.") +enum CredentialsType { + AccountKey, + Certificate, + None, + Sas, + ServicePrincipal, + KerberosKeytab, + KerberosPassword, +} + +@doc("Enum to determine the datastore contents type.") +enum DatastoreType { + AzureBlob, + AzureDataLakeGen1, + AzureDataLakeGen2, + AzureFile, + Hdfs, + OneLake, +} + +@doc("Enum to determine the datastore secrets type.") +enum SecretsType { + AccountKey, + Certificate, + Sas, + ServicePrincipal, + KerberosPassword, + KerberosKeytab, +} + +enum FeatureDataType { + String, + Integer, + Long, + Float, + Double, + Binary, + Datetime, + Boolean, +} + +@doc("Enum to determine the email notification type.") +enum EmailNotificationEnableType { + JobCompleted, + JobFailed, + JobCancelled, +} + +@doc("Enum to determine the webhook callback service type.") +enum WebhookType { + AzureDevOps, +} + +@doc("Enum to describe the frequency of a recurrence schedule") +enum RecurrenceFrequency { + @doc("Minute frequency") Minute, + @doc("Hour frequency") Hour, + @doc("Day frequency") Day, + @doc("Week frequency") Week, + @doc("Month frequency") Month, +} + +@doc("Enum of weekday") +enum WeekDay { + @doc("Monday weekday") Monday, + @doc("Tuesday weekday") Tuesday, + @doc("Wednesday weekday") Wednesday, + @doc("Thursday weekday") Thursday, + @doc("Friday weekday") Friday, + @doc("Saturday weekday") Saturday, + @doc("Sunday weekday") Sunday, +} + +enum TriggerType { + Recurrence, + Cron, +} + +enum MaterializationStoreType { + None, + Online, + Offline, + OnlineAndOffline, +} + +@doc("The status of a job.") +enum JobStatus { + @doc("Run hasn't started yet.") NotStarted, + @doc("Run has started. The user has a run ID.") Starting, + @doc("(Not used currently) It will be used if ES is creating the compute target.") + Provisioning, + @doc("The run environment is being prepared.") Preparing, + @doc("The job is queued in the compute target. For example, in BatchAI the job is in queued state, while waiting for all required nodes to be ready.") + Queued, + @doc("The job started to run in the compute target.") Running, + @doc("Job is completed in the target. It is in output collection state now.") + Finalizing, + @doc("Cancellation has been requested for the job.") CancelRequested, + @doc("Job completed successfully. This reflects that both the job itself and output collection states completed successfully") + Completed, + @doc("Job failed.") Failed, + @doc("Following cancellation request, the job is now successfully canceled.") + Canceled, + @doc(""" +When heartbeat is enabled, if the run isn't updating any information to RunHistory then the run goes to NotResponding state. +NotResponding is the only state that is exempt from strict transition orders. A run can go from NotResponding to any of the previous states. +""") + NotResponding, + @doc("The job is paused by users. Some adjustment to labeling jobs can be made only in paused state.") + Paused, + @doc("Default job status if not mapped to all other statuses") Unknown, + @doc("The job is in a scheduled state. Job is not in any active state.") + Scheduled, +} + +enum FeaturestoreJobType { + RecurrentMaterialization, + BackfillMaterialization, +} + +@doc("Enum to determine identity framework.") +enum IdentityConfigurationType { + Managed, + AMLToken, + UserIdentity, +} + +@doc("Enum to determine the type of job.") +enum JobType { + AutoML, + Command, + Labeling, + Sweep, + Pipeline, + Spark, +} + +@doc("The enumerated types for the nodes value") +enum NodesValueType { + All, + Custom, +} + +@doc("Whether IncrementalDataRefresh is enabled") +enum IncrementalDataRefresh { + Enabled, + Disabled, +} + +@doc("Whether multiSelect is enabled") +enum MultiSelect { + Enabled, + Disabled, +} + +@doc("Media type of data asset.") +enum MediaType { + Image, + Text, +} + +enum MLAssistConfigurationType { + Enabled, + Disabled, +} + +@doc("Enum to determine the job provisioning state.") +enum JobProvisioningState { + Succeeded, + Failed, + Canceled, + InProgress, +} + +enum StatusMessageLevel { + Error, + Information, + Warning, +} + +@doc("The format of exported labels.") +enum ExportFormatType { + Dataset, + Coco, + CSV, +} + +@doc("Enum to determine endpoint compute type.") +enum EndpointComputeType { + Managed, + Kubernetes, + AzureMLCompute, +} + +enum OrderString { + CreatedAtDesc, + CreatedAtAsc, + UpdatedAtDesc, + UpdatedAtAsc, +} + +@doc("Enum to determine whether PublicNetworkAccess is Enabled or Disabled.") +enum PublicNetworkAccessType { + Enabled, + Disabled, +} + +enum DataCollectionMode { + Enabled, + Disabled, +} + +enum RollingRateType { + Year, + Month, + Day, + Hour, + Minute, +} + +@doc("Enum to determine whether PublicNetworkAccess is Enabled or Disabled for egress of a deployment.") +enum EgressPublicNetworkAccessType { + Enabled, + Disabled, +} + +enum ScaleType { + Default, + TargetUtilization, +} + +@doc("The type of container to retrieve logs from.") +enum ContainerType { + @doc("The container used to download models and score script.") + StorageInitializer, + @doc("The container used to serve user's request.") InferenceServer, + @doc("The container used to collect payload and custom logging when mdc is enabled.") + ModelDataCollector, +} + +@doc("Node scaling setting for the compute sku.") +enum SkuScaleType { + @doc("Automatically scales node count.") Automatic, + @doc("Node count scaled upon user request.") Manual, + @doc("Fixed set of nodes.") None, +} + +enum KeyType { + Primary, + Secondary, +} + +enum ScheduleListViewType { + EnabledOnly, + DisabledOnly, + All, +} + +enum ScheduleActionType { + CreateJob, + InvokeBatchEndpoint, + ImportData, + CreateMonitor, +} + +enum ScheduleProvisioningStatus { + Creating, + Updating, + Deleting, + Succeeded, + Failed, + Canceled, +} + +@doc("Connection status of the service consumer with the service provider") +enum EndpointServiceConnectionStatus { + Approved, + Pending, + Rejected, + Disconnected, + Timeout, +} + +@doc("Indicates whether or not the encryption is enabled for the workspace.") +enum EncryptionStatus { + Enabled, + Disabled, +} + +@doc("Isolation mode for the managed network of a machine learning workspace.") +enum IsolationMode { + Disabled, + AllowInternetOutbound, + AllowOnlyApprovedOutbound, +} + +@doc("Category of a managed network Outbound Rule of a machine learning workspace.") +enum RuleCategory { + Required, + Recommended, + UserDefined, +} + +@doc("Type of a managed network Outbound Rule of a machine learning workspace.") +enum RuleStatus { + Inactive, + Active, +} + +@doc("Type of a managed network Outbound Rule of a machine learning workspace.") +enum RuleType { + FQDN, + PrivateEndpoint, + ServiceTag, +} + +@doc("Status for the managed network of a machine learning workspace.") +enum ManagedNetworkStatus { + Inactive, + Active, +} + +@doc("The current provisioning state.") +enum PrivateEndpointConnectionProvisioningState { + Succeeded, + Creating, + Deleting, + Failed, +} + +@doc("Authentication type of the connection target") +enum ConnectionAuthType { + PAT, + ManagedIdentity, + UsernamePassword, + None, + SAS, + ServicePrincipal, + AccessKey, + ApiKey, + CustomKeys, +} + +@doc("Category of the connection") +enum ConnectionCategory { + PythonFeed, + ContainerRegistry, + Git, + S3, + Snowflake, + AzureSqlDb, + AzureSynapseAnalytics, + AzureMySqlDb, + AzurePostgresDb, + ADLSGen2, + Redis, + ApiKey, + AzureOpenAI, + CognitiveSearch, + CognitiveService, + CustomKeys, +} + +@doc("Level of workspace setup error") +enum DiagnoseResultLevel { + Warning, + Error, + Information, +} + +@doc("Intended usage of the cluster") +enum ClusterPurpose { + FastProd, + DenseProd, + DevTest, +} + +@doc("Enable or disable ssl for scoring") +enum SslConfigStatus { + Disabled, + Enabled, + Auto, +} + +@doc("Load Balancer Type") +enum LoadBalancerType { + PublicIp, + InternalLoadBalancer, +} + +@doc("Compute OS Type") +enum OsType { + Linux, + Windows, +} + +@doc("Virtual Machine priority") +enum VmPriority { + Dedicated, + LowPriority, +} + +@doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled.") +enum RemoteLoginPortPublicAccess { + Enabled, + Disabled, + NotSpecified, +} + +@doc("Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute.") +enum AllocationState { + Steady, + Resizing, +} + +@doc("Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role.") +enum ApplicationSharingPolicy { + Personal, + Shared, +} + +@doc("Indicates whether mlflow autologger is enabled for notebooks.") +enum MlflowAutologger { + Enabled, + Disabled, +} + +@doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.") +enum SshPublicAccess { + Enabled, + Disabled, +} + +@doc("Current state of an ComputeInstance.") +enum ComputeInstanceState { + Creating, + CreateFailed, + Deleting, + Running, + Restarting, + JobRunning, + SettingUp, + SetupFailed, + Starting, + Stopped, + Stopping, + UserSettingUp, + UserSetupFailed, + Unknown, + Unusable, +} + +@doc("The Compute Instance Authorization type. Available values are personal (default).") +enum ComputeInstanceAuthorizationType { + personal, +} + +@doc("Name of the last operation.") +enum OperationName { + Create, + Start, + Stop, + Restart, + Reimage, + Delete, +} + +@doc("Operation status.") +enum OperationStatus { + InProgress, + Succeeded, + CreateFailed, + StartFailed, + StopFailed, + RestartFailed, + ReimageFailed, + DeleteFailed, +} + +@doc("Trigger of operation.") +enum OperationTrigger { + User, + Schedule, + IdleShutdown, +} + +@doc("The current deployment state of schedule.") +enum ProvisioningStatus { + Completed, + Provisioning, + Failed, +} + +@doc("Is the schedule enabled or disabled?") +enum ScheduleStatus { + Enabled, + Disabled, +} + +@doc("[Required] The compute power action.") +enum ComputePowerAction { + Start, + Stop, +} + +@doc("The current deployment state of schedule.") +enum ScheduleProvisioningState { + Completed, + Provisioning, + Failed, +} + +@doc("Auto save settings.") +enum Autosave { + None, + Local, + Remote, +} + +@doc("network of this container.") +enum Network { + Bridge, + Host, +} + +@doc("Caching type of Data Disk.") +enum Caching { + None, + ReadOnly, + ReadWrite, +} + +@doc("type of this storage account.") +enum StorageAccountType { + Standard_LRS, + Premium_LRS, +} + +@doc("Data source type.") +enum SourceType { + Dataset, + Datastore, + URI, +} + +@doc("Mount Action.") +enum MountAction { + Mount, + Unmount, +} + +@doc("Mount state.") +enum MountState { + MountRequested, + Mounted, + MountFailed, + UnmountRequested, + UnmountFailed, + Unmounted, +} + +enum MonitoringFeatureFilterType { + @doc("Includes all features.") AllFeatures, + @doc("Only includes the top contributing features, measured by feature attribution.") + TopNByAttribution, + @doc("Includes a user-defined subset of features.") FeatureSubset, +} + +@doc("Monitor compute identity type enum.") +enum MonitorComputeIdentityType { + @doc("Authenticates through user's AML token.") AmlToken, + @doc("Authenticates through a user-provided managed identity.") + ManagedIdentity, +} + +@doc("Enum to determine the input data delivery mode.") +enum InputDeliveryMode { + ReadOnlyMount, + ReadWriteMount, + Download, + Direct, + EvalMount, + EvalDownload, +} + +@doc("Output data delivery mode enums.") +enum OutputDeliveryMode { + ReadWriteMount, + Upload, + Direct, +} + +@doc("Enum to determine forecast horizon selection mode.") +enum ForecastHorizonMode { + @doc("Forecast horizon to be determined automatically.") Auto, + @doc("Use the custom forecast horizon.") Custom, +} + +@doc("Enum to determine the Job Output Type.") +enum JobOutputType { + uri_file, + uri_folder, + mltable, + custom_model, + mlflow_model, + triton_model, +} + +@doc("Enum to determine the job tier.") +enum JobTier { + Null, + Spot, + Basic, + Standard, + Premium, +} + +@doc("Enum for setting log verbosity.") +enum LogVerbosity { + @doc("No logs emitted.") NotSet, + @doc("Debug and above log statements logged.") Debug, + @doc("Info and above log statements logged.") Info, + @doc("Warning and above log statements logged.") Warning, + @doc("Error and above log statements logged.") Error, + @doc("Only critical statements logged.") Critical, +} + +@doc("AutoMLJob Task type.") +enum TaskType { + @doc(""" +Classification in machine learning and statistics is a supervised learning approach in which +the computer program learns from the data given to it and make new observations or classifications. +""") + Classification, + @doc("Regression means to predict the value using the input data. Regression models are used to predict a continuous value.") + Regression, + @doc(""" +Forecasting is a special kind of regression task that deals with time-series data and creates forecasting model +that can be used to predict the near future values based on the inputs. +""") + Forecasting, + @doc(""" +Image Classification. Multi-class image classification is used when an image is classified with only a single label +from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. +""") + ImageClassification, + @doc(""" +Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels +from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. +""") + ImageClassificationMultilabel, + @doc(""" +Image Object Detection. Object detection is used to identify objects in an image and locate each object with a +bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. +""") + ImageObjectDetection, + @doc(""" +Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, +drawing a polygon around each object in the image. +""") + ImageInstanceSegmentation, + @doc(""" +Text classification (also known as text tagging or text categorization) is the process of sorting texts into categories. +Categories are mutually exclusive. +""") + TextClassification, + @doc("Multilabel classification task assigns each sample to a group (zero or more) of target labels.") + TextClassificationMultilabel, + @doc(""" +Text Named Entity Recognition a.k.a. TextNER. +Named Entity Recognition (NER) is the ability to take free-form text and identify the occurrences of entities such as people, locations, organizations, and more. +""") + TextNER, +} + +@doc("Enum to determine the Job Input Type.") +enum JobInputType { + literal, + uri_file, + uri_folder, + mltable, + custom_model, + mlflow_model, + triton_model, +} + +@doc("Determines how N-Cross validations value is determined.") +enum NCrossValidationsMode { + @doc("Determine N-Cross validations value automatically. Supported only for 'Forecasting' AutoML task.") + Auto, + @doc("Use custom N-Cross validations value.") Custom, +} + +@doc("Forecasting seasonality mode.") +enum SeasonalityMode { + @doc("Seasonality to be determined automatically.") Auto, + @doc("Use the custom seasonality value.") Custom, +} + +@doc("Target lags selection modes.") +enum TargetLagsMode { + @doc("Target lags to be determined automatically.") Auto, + @doc("Use the custom target lags.") Custom, +} + +@doc("Target rolling windows size mode.") +enum TargetRollingWindowSizeMode { + @doc("Determine rolling windows size automatically.") Auto, + @doc("Use the specified rolling window size.") Custom, +} + +@doc("Enum to determine the state of mlflow autologger.") +enum MLFlowAutologgerState { + Enabled, + Disabled, +} + +enum MonitoringAlertNotificationType { + @doc("Settings for Azure Monitor based alerting.") AzureMonitor, + @doc("Settings for AML email notifications.") Email, +} + +enum ServiceDataAccessAuthIdentity { + @doc("Do not use any identity for service data access.") None, + @doc("Use the system assigned managed identity of the Workspace to authenticate service data access.") + WorkspaceSystemAssignedIdentity, + @doc("Use the user assigned managed identity of the Workspace to authenticate service data access.") + WorkspaceUserAssignedIdentity, +} + +enum EarlyTerminationPolicyType { + Bandit, + MedianStopping, + TruncationSelection, +} + +enum SamplingAlgorithmType { + Grid, + Random, + Bayesian, +} + +enum CategoricalDataDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Pearsons Chi Squared Test metric.") PearsonsChiSquaredTest, +} + +enum MonitoringFeatureDataType { + @doc("Used for features of numerical data type.") Numerical, + @doc("Used for features of categorical data type.") Categorical, +} + +enum CategoricalDataQualityMetric { + @doc("Calculates the rate of null values.") NullValueRate, + @doc("Calculates the rate of data type errors.") DataTypeErrorRate, + @doc("Calculates the rate values are out of bounds.") OutOfBoundsRate, +} + +enum CategoricalPredictionDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Pearsons Chi Squared Test metric.") PearsonsChiSquaredTest, +} + +@doc("Primary metrics for classification tasks.") +enum ClassificationPrimaryMetrics { + @doc(""" +AUC is the Area under the curve. +This metric represents arithmetic mean of the score for each class, +weighted by the number of true instances in each class. +""") + AUCWeighted, + @doc("Accuracy is the ratio of predictions that exactly match the true class labels.") + Accuracy, + @doc(""" +Normalized macro recall is recall macro-averaged and normalized, so that random +performance has a score of 0, and perfect performance has a score of 1. +""") + NormMacroRecall, + @doc(""" +The arithmetic mean of the average precision score for each class, weighted by +the number of true instances in each class. +""") + AveragePrecisionScoreWeighted, + @doc("The arithmetic mean of precision for each class, weighted by number of true instances in each class.") + PrecisionScoreWeighted, +} + +@doc("Enum for all classification models supported by AutoML.") +enum ClassificationModels { + @doc(""" +Logistic regression is a fundamental classification technique. +It belongs to the group of linear classifiers and is somewhat similar to polynomial and linear regression. +Logistic regression is fast and relatively uncomplicated, and it's convenient for you to interpret the results. +Although it's essentially a method for binary classification, it can also be applied to multiclass problems. +""") + LogisticRegression, + @doc(""" +SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +""") + SGD, + @doc(""" +The multinomial Naive Bayes classifier is suitable for classification with discrete features (e.g., word counts for text classification). +The multinomial distribution normally requires integer feature counts. However, in practice, fractional counts such as tf-idf may also work. +""") + MultinomialNaiveBayes, + @doc("Naive Bayes classifier for multivariate Bernoulli models.") + BernoulliNaiveBayes, + @doc(""" +A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. +After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. +""") + SVM, + @doc(""" +A support vector machine (SVM) is a supervised machine learning model that uses classification algorithms for two-group classification problems. +After giving an SVM model sets of labeled training data for each category, they're able to categorize new text. +Linear SVM performs best when input data is linear, i.e., data can be easily classified by drawing the straight line between classified values on a plotted graph. +""") + LinearSVM, + @doc(""" +K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +""") + KNN, + @doc(""" +Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +""") + DecisionTree, + @doc(""" +Random forest is a supervised learning algorithm. +The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +""") + RandomForest, + @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") + ExtremeRandomTrees, + @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") + LightGBM, + @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") + GradientBoosting, + @doc("XGBoost: Extreme Gradient Boosting Algorithm. This algorithm is used for structured data where target column values can be divided into distinct class values.") + XGBoostClassifier, +} + +@doc(""" +The meta-learner is a model trained on the output of the individual heterogeneous models. +Default meta-learners are LogisticRegression for classification tasks (or LogisticRegressionCV if cross-validation is enabled) and ElasticNet for regression/forecasting tasks (or ElasticNetCV if cross-validation is enabled). +This parameter can be one of the following strings: LogisticRegression, LogisticRegressionCV, LightGBMClassifier, ElasticNet, ElasticNetCV, LightGBMRegressor, or LinearRegression +""") +enum StackMetaLearnerType { + None, + @doc("Default meta-learners are LogisticRegression for classification tasks.") + LogisticRegression, + @doc("Default meta-learners are LogisticRegression for classification task when CV is on.") + LogisticRegressionCV, + LightGBMClassifier, + @doc("Default meta-learners are LogisticRegression for regression task.") + ElasticNet, + @doc("Default meta-learners are LogisticRegression for regression task when CV is on.") + ElasticNetCV, + LightGBMRegressor, + LinearRegression, +} + +@doc("Training mode dictates whether to use distributed training or not") +enum TrainingMode { + @doc("Auto mode") Auto, + @doc("Distributed training mode") Distributed, + @doc("Non distributed training mode") NonDistributed, +} + +@doc("Enum for all classification models supported by AutoML.") +enum BlockedTransformers { + @doc("Target encoding for text data.") TextTargetEncoder, + @doc("Ohe hot encoding creates a binary feature transformation.") + OneHotEncoder, + @doc("Target encoding for categorical data.") CatTargetEncoder, + @doc("Tf-Idf stands for, term-frequency times inverse document-frequency. This is a common term weighting scheme for identifying information from documents.") + TfIdf, + @doc("Weight of Evidence encoding is a technique used to encode categorical variables. It uses the natural log of the P(1)/P(0) to create weights.") + WoETargetEncoder, + @doc("Label encoder converts labels/categorical variables in a numerical form.") + LabelEncoder, + @doc("Word embedding helps represents words or phrases as a vector, or a series of numbers.") + WordEmbedding, + @doc("Naive Bayes is a classified that is used for classification of discrete features that are categorically distributed.") + NaiveBayes, + @doc("Count Vectorizer converts a collection of text documents to a matrix of token counts.") + CountVectorizer, + @doc("Hashing One Hot Encoder can turn categorical variables into a limited number of new features. This is often used for high-cardinality categorical features.") + HashOneHotEncoder, +} + +@doc("Featurization mode - determines data featurization mode.") +enum FeaturizationMode { + @doc("Auto mode, system performs featurization without any custom featurization inputs.") + Auto, + @doc("Custom featurization.") Custom, + @doc("Featurization off. 'Forecasting' task cannot use this value.") Off, +} + +enum ClassificationModelPerformanceMetric { + @doc("Calculates the accuracy of the model predictions.") Accuracy, + @doc("Calculates the precision of the model predictions.") Precision, + @doc("Calculates the recall of the model predictions.") Recall, +} + +enum MonitoringModelType { + @doc("A model trained for classification tasks.") Classification, + @doc("A model trained for regressions tasks.") Regression, +} + +@doc("Enum to determine the job distribution type.") +enum DistributionType { + PyTorch, + TensorFlow, + Mpi, + Ray, +} + +enum JobLimitsType { + Command, + Sweep, +} + +@doc("Monitor compute type enum.") +enum MonitorComputeType { + @doc("Serverless Spark compute.") ServerlessSpark, +} + +@doc("Model task type enum.") +enum ModelTaskType { + Classification, + Regression, + QuestionAnswering, +} + +enum MonitoringNotificationMode { + @doc("Disabled notifications will not produce emails/metrics leveraged for alerting.") + Disabled, + @doc("Enabled notification will produce emails/metrics leveraged for alerting.") + Enabled, +} + +enum MonitoringSignalType { + @doc("Tracks model input data distribution change, comparing against training data or past production data.") + DataDrift, + @doc("Tracks prediction result data distribution change, comparing against validation/test label data or past production data.") + PredictionDrift, + @doc("Tracks model input data integrity.") DataQuality, + @doc("Tracks feature importance change in production, comparing against feature importance at training time.") + FeatureAttributionDrift, + @doc("Tracks a custom signal provided by users.") Custom, + @doc("Tracks model performance based on ground truth data.") ModelPerformance, + @doc("Tracks the safety and quality of generated content.") + GenerationSafetyQuality, + @doc("Tracks the token usage of generative endpoints.") + GenerationTokenStatistics, +} + +@doc("Monitoring input data type enum.") +enum MonitoringInputDataType { + @doc("An input data with a fixed window size.") Static, + @doc("An input data which trailing relatively to the monitor's current run.") + Trailing, + @doc("An input data with tabular format which doesn't require preprocessing.") + Fixed, +} + +@doc("Enum to determine the type of data.") +enum DataImportSourceType { + database, + file_system, +} + +enum FeatureAttributionMetric { + @doc("The Normalized Discounted Cumulative Gain metric.") + NormalizedDiscountedCumulativeGain, +} + +@doc("Flag for generating lags for the numeric features.") +enum FeatureLags { + @doc("No feature lags generated.") None, + @doc("System auto-generates feature lags.") Auto, +} + +@doc("The parameter defining how if AutoML should handle short time series.") +enum ShortSeriesHandlingConfiguration { + @doc("Represents no/null value.") None, + @doc("Short series will be padded if there are no long series, otherwise short series will be dropped.") + Auto, + @doc("All the short series will be padded.") Pad, + @doc("All the short series will be dropped.") Drop, +} + +@doc("Target aggregate function.") +enum TargetAggregationFunction { + @doc("Represent no value set.") None, + Sum, + Max, + Min, + Mean, +} + +@doc("Configure STL Decomposition of the time-series target column.") +enum UseStl { + @doc("No stl decomposition.") None, + Season, + SeasonTrend, +} + +@doc("Primary metrics for Forecasting task.") +enum ForecastingPrimaryMetrics { + @doc("The Spearman's rank coefficient of correlation is a non-parametric measure of rank correlation.") + SpearmanCorrelation, + @doc("The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.") + NormalizedRootMeanSquaredError, + @doc("The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.") + R2Score, + @doc("The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.") + NormalizedMeanAbsoluteError, +} + +@doc("Enum for all forecasting models supported by AutoML.") +enum ForecastingModels { + @doc(""" +Auto-Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. +This model aims to explain data by using time series data on its past values and uses linear regression to make predictions. +""") + AutoArima, + @doc(""" +Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. +It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well. +""") + Prophet, + @doc("The Naive forecasting model makes predictions by carrying forward the latest target value for each time-series in the training data.") + Naive, + @doc("The Seasonal Naive forecasting model makes predictions by carrying forward the latest season of target values for each time-series in the training data.") + SeasonalNaive, + @doc("The Average forecasting model makes predictions by carrying forward the average of the target values for each time-series in the training data.") + Average, + @doc("The Seasonal Average forecasting model makes predictions by carrying forward the average value of the latest season of data for each time-series in the training data.") + SeasonalAverage, + @doc("Exponential smoothing is a time series forecasting method for univariate data that can be extended to support data with a systematic trend or seasonal component.") + ExponentialSmoothing, + @doc(""" +An Autoregressive Integrated Moving Average with Explanatory Variable (ARIMAX) model can be viewed as a multiple regression model with one or more autoregressive (AR) terms and/or one or more moving average (MA) terms. +This method is suitable for forecasting when data is stationary/non stationary, and multivariate with any type of data pattern, i.e., level/trend /seasonality/cyclicity. +""") + Arimax, + @doc("TCNForecaster: Temporal Convolutional Networks Forecaster. //TODO: Ask forecasting team for brief intro.") + TCNForecaster, + @doc("Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.") + ElasticNet, + @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") + GradientBoosting, + @doc(""" +Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +""") + DecisionTree, + @doc(""" +K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +""") + KNN, + @doc("Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.") + LassoLars, + @doc(""" +SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +It's an inexact but powerful technique. +""") + SGD, + @doc(""" +Random forest is a supervised learning algorithm. +The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +""") + RandomForest, + @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") + ExtremeRandomTrees, + @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") + LightGBM, + @doc("XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.") + XGBoostRegressor, +} + +@doc("Generation safety quality metric enum.") +enum GenerationSafetyQualityMetric { + AcceptableGroundednessScorePerInstance, + AggregatedGroundednessPassRate, + AcceptableCoherenceScorePerInstance, + AggregatedCoherencePassRate, + AcceptableFluencyScorePerInstance, + AggregatedFluencyPassRate, + AcceptableSimilarityScorePerInstance, + AggregatedSimilarityPassRate, + AcceptableRelevanceScorePerInstance, + AggregatedRelevancePassRate, +} + +@doc("Generation token statistics metric enum.") +enum GenerationTokenStatisticsMetric { + TotalTokenCount, + TotalTokenCountPerGroup, +} + +@doc("Learning rate scheduler enum.") +enum LearningRateScheduler { + @doc("No learning rate scheduler selected.") None, + @doc("Cosine Annealing With Warmup.") WarmupCosine, + @doc("Step learning rate scheduler.") Step, +} + +@doc("Stochastic optimizer for image models.") +enum StochasticOptimizer { + @doc("No optimizer selected.") None, + @doc("Stochastic Gradient Descent optimizer.") Sgd, + @doc("Adam is algorithm the optimizes stochastic objective functions based on adaptive estimates of moments") + Adam, + @doc("AdamW is a variant of the optimizer Adam that has an improved implementation of weight decay.") + Adamw, +} + +@doc("Primary metrics for classification multilabel tasks.") +enum ClassificationMultilabelPrimaryMetrics { + @doc(""" +AUC is the Area under the curve. +This metric represents arithmetic mean of the score for each class, +weighted by the number of true instances in each class. +""") + AUCWeighted, + @doc("Accuracy is the ratio of predictions that exactly match the true class labels.") + Accuracy, + @doc(""" +Normalized macro recall is recall macro-averaged and normalized, so that random +performance has a score of 0, and perfect performance has a score of 1. +""") + NormMacroRecall, + @doc(""" +The arithmetic mean of the average precision score for each class, weighted by +the number of true instances in each class. +""") + AveragePrecisionScoreWeighted, + @doc("The arithmetic mean of precision for each class, weighted by number of true instances in each class.") + PrecisionScoreWeighted, + @doc("Intersection Over Union. Intersection of predictions divided by union of predictions.") + IOU, +} + +@doc("Primary metrics for InstanceSegmentation tasks.") +enum InstanceSegmentationPrimaryMetrics { + @doc(""" +Mean Average Precision (MAP) is the average of AP (Average Precision). +AP is calculated for each class and averaged to get the MAP. +""") + MeanAveragePrecision, +} + +enum LogTrainingMetrics { + @doc("Enable compute and log training metrics.") Enable, + @doc("Disable compute and log training metrics.") Disable, +} + +enum LogValidationLoss { + @doc("Enable compute and log validation metrics.") Enable, + @doc("Disable compute and log validation metrics.") Disable, +} + +@doc("Image model size.") +enum ModelSize { + @doc("No value selected.") None, + @doc("Small size.") Small, + @doc("Medium size.") Medium, + @doc("Large size.") Large, + @doc("Extra large size.") ExtraLarge, +} + +@doc("Metric computation method to use for validation metrics in image tasks.") +enum ValidationMetricType { + @doc("No metric.") None, + @doc("Coco metric.") Coco, + @doc("Voc metric.") Voc, + @doc("CocoVoc metric.") CocoVoc, +} + +@doc("Primary metrics for Image ObjectDetection task.") +enum ObjectDetectionPrimaryMetrics { + @doc(""" +Mean Average Precision (MAP) is the average of AP (Average Precision). +AP is calculated for each class and averaged to get the MAP. +""") + MeanAveragePrecision, +} + +@doc("Annotation type of image data.") +enum ImageAnnotationType { + Classification, + BoundingBox, + InstanceSegmentation, +} + +@doc("Annotation type of text data.") +enum TextAnnotationType { + Classification, + NamedEntityRecognition, +} + +@doc("Enum to determine OneLake artifact type.") +enum OneLakeArtifactType { + LakeHouse, +} + +@doc("Enum of learning rate schedulers that aligns with those supported by HF") +enum NlpLearningRateScheduler { + @doc("No learning rate schedule.") None, + @doc("Linear warmup and decay.") Linear, + @doc("Linear warmup then cosine decay.") Cosine, + @doc("Linear warmup, cosine decay, then restart to initial LR.") + CosineWithRestarts, + @doc("Increase linearly then polynomially decay.") Polynomial, + @doc("Constant learning rate.") Constant, + @doc("Linear warmup followed by constant value.") ConstantWithWarmup, +} + +enum NumericalDataDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Normalized Wasserstein Distance metric.") + NormalizedWassersteinDistance, + @doc("The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric.") + TwoSampleKolmogorovSmirnovTest, +} + +enum NumericalDataQualityMetric { + @doc("Calculates the rate of null values.") NullValueRate, + @doc("Calculates the rate of data type errors.") DataTypeErrorRate, + @doc("Calculates the rate values are out of bounds.") OutOfBoundsRate, +} + +enum NumericalPredictionDriftMetric { + @doc("The Jensen Shannon Distance (JSD) metric.") JensenShannonDistance, + @doc("The Population Stability Index (PSI) metric.") PopulationStabilityIndex, + @doc("The Normalized Wasserstein Distance metric.") + NormalizedWassersteinDistance, + @doc("The Two Sample Kolmogorov-Smirnov Test (two-sample K–S) metric.") + TwoSampleKolmogorovSmirnovTest, +} + +@doc("Defines supported metric goals for hyperparameter tuning") +enum Goal { + Minimize, + Maximize, +} + +@doc("The specific type of random algorithm") +enum RandomSamplingAlgorithmRule { + Random, + Sobol, +} + +@doc("Primary metrics for Regression task.") +enum RegressionPrimaryMetrics { + @doc("The Spearman's rank coefficient of correlation is a nonparametric measure of rank correlation.") + SpearmanCorrelation, + @doc("The Normalized Root Mean Squared Error (NRMSE) the RMSE facilitates the comparison between models with different scales.") + NormalizedRootMeanSquaredError, + @doc("The R2 score is one of the performance evaluation measures for forecasting-based machine learning models.") + R2Score, + @doc("The Normalized Mean Absolute Error (NMAE) is a validation metric to compare the Mean Absolute Error (MAE) of (time) series with different scales.") + NormalizedMeanAbsoluteError, +} + +@doc("Enum for all Regression models supported by AutoML.") +enum RegressionModels { + @doc("Elastic net is a popular type of regularized linear regression that combines two popular penalties, specifically the L1 and L2 penalty functions.") + ElasticNet, + @doc("The technique of transiting week learners into a strong learner is called Boosting. The gradient boosting algorithm process works on this theory of execution.") + GradientBoosting, + @doc(""" +Decision Trees are a non-parametric supervised learning method used for both classification and regression tasks. +The goal is to create a model that predicts the value of a target variable by learning simple decision rules inferred from the data features. +""") + DecisionTree, + @doc(""" +K-nearest neighbors (KNN) algorithm uses 'feature similarity' to predict the values of new datapoints +which further means that the new data point will be assigned a value based on how closely it matches the points in the training set. +""") + KNN, + @doc("Lasso model fit with Least Angle Regression a.k.a. Lars. It is a Linear Model trained with an L1 prior as regularizer.") + LassoLars, + @doc(""" +SGD: Stochastic gradient descent is an optimization algorithm often used in machine learning applications +to find the model parameters that correspond to the best fit between predicted and actual outputs. +It's an inexact but powerful technique. +""") + SGD, + @doc(""" +Random forest is a supervised learning algorithm. +The \"forest\" it builds, is an ensemble of decision trees, usually trained with the bagging method. +The general idea of the bagging method is that a combination of learning models increases the overall result. +""") + RandomForest, + @doc("Extreme Trees is an ensemble machine learning algorithm that combines the predictions from many decision trees. It is related to the widely used random forest algorithm.") + ExtremeRandomTrees, + @doc("LightGBM is a gradient boosting framework that uses tree based learning algorithms.") + LightGBM, + @doc("XGBoostRegressor: Extreme Gradient Boosting Regressor is a supervised machine learning model using ensemble of base learners.") + XGBoostRegressor, +} + +enum RegressionModelPerformanceMetric { + @doc("The Mean Absolute Error (MAE) metric.") MeanAbsoluteError, + @doc("The Root Mean Squared Error (RMSE) metric.") RootMeanSquaredError, + @doc("The Mean Squared Error (MSE) metric.") MeanSquaredError, +} + +enum SparkJobEntryType { + SparkJobPythonEntry, + SparkJobScalaEntry, +} + +@doc("The action enum for networking rule.") +enum RuleAction { + Allow, + Deny, +} + +@doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") +@fixed +enum SkuTier { + Free, + Basic, + Standard, + Premium, +} + +@doc("The List Usages operation response.") +model ListUsagesResult is Azure.Core.Page; + +@doc("Describes AML Resource Usage.") +model Usage { + @doc("Specifies the resource ID.") + @visibility("read") + id?: string; + + @doc("Region of the AML workspace in the id.") + @visibility("read") + amlWorkspaceLocation?: string; + + @doc("Specifies the resource type.") + @visibility("read") + type?: string; + + @doc("An enum describing the unit of usage measurement.") + @visibility("read") + unit?: UsageUnit; + + @doc("The current usage of the resource.") + @visibility("read") + currentValue?: int32; + + @doc("The maximum permitted usage of the resource.") + @visibility("read") + limit?: int32; + + @doc("The name of the type of usage.") + @visibility("read") + name?: UsageName; +} + +@doc("The Usage Names.") +model UsageName { + @doc("The name of the resource.") + @visibility("read") + value?: string; + + @doc("The localized name of the resource.") + @visibility("read") + localizedValue?: string; +} + +@doc("The List Virtual Machine size operation response.") +model VirtualMachineSizeListResult { + @doc("The list of virtual machine sizes supported by AmlCompute.") + value?: VirtualMachineSize[]; +} + +@doc("Describes the properties of a VM size.") +model VirtualMachineSize { + @doc("The name of the virtual machine size.") + @visibility("read") + name?: string; + + @doc("The family name of the virtual machine size.") + @visibility("read") + family?: string; + + @doc("The number of vCPUs supported by the virtual machine size.") + @visibility("read") + vCPUs?: int32; + + @doc("The number of gPUs supported by the virtual machine size.") + @visibility("read") + gpus?: int32; + + @doc("The OS VHD disk size, in MB, allowed by the virtual machine size.") + @visibility("read") + osVhdSizeMB?: int32; + + @doc("The resource volume size, in MB, allowed by the virtual machine size.") + @visibility("read") + maxResourceVolumeMB?: int32; + + @doc("The amount of memory, in GB, supported by the virtual machine size.") + @visibility("read") + memoryGB?: float32; + + @doc("Specifies if the virtual machine size supports low priority VMs.") + @visibility("read") + lowPriorityCapable?: boolean; + + @doc("Specifies if the virtual machine size supports premium IO.") + @visibility("read") + premiumIO?: boolean; + + @doc("The estimated price information for using a VM.") + estimatedVMPrices?: EstimatedVMPrices; + + @doc("Specifies the compute types supported by the virtual machine size.") + supportedComputeTypes?: string[]; +} + +@doc("The estimated price info for using a VM.") +model EstimatedVMPrices { + @doc("Three lettered code specifying the currency of the VM price. Example: USD") + billingCurrency: BillingCurrency; + + @doc("The unit of time measurement for the specified VM price. Example: OneHour") + unitOfMeasure: UnitOfMeasure; + + @doc("The list of estimated prices for using a VM of a particular OS type, tier, etc.") + values: EstimatedVMPrice[]; +} + +@doc("The estimated price info for using a VM of a particular OS type, tier, etc.") +model EstimatedVMPrice { + @doc("The price charged for using the VM.") + retailPrice: float32; + + @doc("Operating system type used by the VM.") + osType: VMPriceOSType; + + @doc("The type of the VM.") + vmTier: VMTier; +} + +@doc("Quota update parameters.") +model QuotaUpdateParameters { + @doc("The list for update quota.") + value?: QuotaBaseProperties[]; + + @doc("Region of workspace quota to be updated.") + location?: string; +} + +@doc("The properties for Quota update or retrieval.") +model QuotaBaseProperties { + @doc("Specifies the resource ID.") + id?: string; + + @doc("Specifies the resource type.") + type?: string; + + @doc("The maximum permitted quota of the resource.") + limit?: int32; + + @doc("An enum describing the unit of quota measurement.") + unit?: QuotaUnit; +} + +@doc("The result of update workspace quota.") +model UpdateWorkspaceQuotasResult { + @doc("The list of workspace quota update result.") + @visibility("read") + value?: UpdateWorkspaceQuotas[]; + + @doc("The URI to fetch the next page of workspace quota update result. Call ListNext() with this to fetch the next page of Workspace Quota update result.") + @visibility("read") + nextLink?: string; +} + +@doc("The properties for update Quota response.") +model UpdateWorkspaceQuotas { + @doc("Specifies the resource ID.") + @visibility("read") + id?: string; + + @doc("Specifies the resource type.") + @visibility("read") + type?: string; + + @doc("The maximum permitted quota of the resource.") + limit?: int32; + + @doc("An enum describing the unit of quota measurement.") + @visibility("read") + unit?: QuotaUnit; + + @doc("Status of update workspace quota.") + status?: Status; +} + +@doc("The List WorkspaceQuotasByVMFamily operation response.") +model ListWorkspaceQuotas is Azure.Core.Page; + +@doc("The quota assigned to a resource.") +model ResourceQuota { + @doc("Specifies the resource ID.") + @visibility("read") + id?: string; + + @doc("Region of the AML workspace in the id.") + @visibility("read") + amlWorkspaceLocation?: string; + + @doc("Specifies the resource type.") + @visibility("read") + type?: string; + + @doc("Name of the resource.") + @visibility("read") + name?: ResourceName; + + @doc("The maximum permitted quota of the resource.") + @visibility("read") + limit?: int32; + + @doc("An enum describing the unit of quota measurement.") + @visibility("read") + unit?: QuotaUnit; +} + +@doc("The Resource Name.") +model ResourceName { + @doc("The name of the resource.") + @visibility("read") + value?: string; + + @doc("The localized name of the resource.") + @visibility("read") + localizedValue?: string; +} + +@doc("The resource model definition representing SKU") +model Sku { + @doc("The name of the SKU. Ex - P3. It is typically a letter+number code") + name: string; + + @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") + tier?: SkuTier; + + @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. ") + size?: string; + + @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.") + family?: string; + + @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.") + capacity?: int32; +} + +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +model ComputeResourceSchema { + @doc("Compute properties") + properties?: Compute; +} + +@doc("Machine Learning compute object.") +@discriminator("computeType") +model Compute { + @doc("Location for the underlying compute") + @visibility("read", "create") + computeLocation?: string; + + @doc("The provision state of the cluster. Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("The description of the Machine Learning compute.") + description?: string; + + @doc("The time at which the compute was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdOn?: utcDateTime; + + @doc("The time at which the compute was last modified.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedOn?: utcDateTime; + + @doc("ARM resource id of the underlying compute") + resourceId?: string; + + @doc("Errors during provisioning") + @visibility("read") + provisioningErrors?: ErrorResponse[]; + + @doc("Indicating whether the compute was provisioned by user and brought from outside if true, or machine learning service provisioned it if false.") + @visibility("read") + isAttachedCompute?: boolean; + + @doc("Opt-out of local authentication and ensure customers can use only MSI and AAD exclusively for authentication.") + @visibility("read", "create") + disableLocalAuth?: boolean; +} + +@doc("AmlCompute update parameters.") +model ClusterUpdateParameters { + @doc("The properties of the amlCompute.") + properties?: ClusterUpdateProperties; +} + +@doc("The properties of a amlCompute that need to be updated.") +model ClusterUpdateProperties { + @doc("Properties of ClusterUpdate") + properties?: ScaleSettingsInformation; +} + +@doc("Desired scale settings for the amlCompute.") +model ScaleSettingsInformation { + @doc("scale settings for AML Compute") + scaleSettings?: ScaleSettings; +} + +@doc("scale settings for AML Compute") +model ScaleSettings { + @doc("Max number of nodes to use") + maxNodeCount: int32; + + @doc("Min number of nodes to use") + minNodeCount?: int32; + + @doc("Node Idle Time before scaling down amlCompute. This string needs to be in the RFC Format.") + nodeIdleTimeBeforeScaleDown?: duration; +} + +@doc("Specifies the custom service configuration") +model CustomService extends Record { + @doc("Name of the Custom Service") + name?: string; + + @doc("Describes the Image Specifications") + image?: Image; + + @doc("Environment Variable for the container") + environmentVariables?: Record; + + @doc("Describes the docker settings for the image") + docker?: Docker; + + @doc("Configuring the endpoints for the container") + endpoints?: Endpoint[]; + + @doc("Configuring the volumes for the container") + volumes?: VolumeDefinition[]; +} + +model Image extends Record { + @doc("Type of the image. Possible values are: docker - For docker images. azureml - For AzureML images") + type?: ImageType; + + @doc("Image reference URL") + reference?: string; +} + +model EnvironmentVariable extends Record { + @doc("Type of the Environment Variable. Possible values are: local - For local variable") + type?: EnvironmentVariableType; + + @doc("Value of the Environment variable") + value?: string; +} + +model Docker extends Record { + @doc("Indicate whether container shall run in privileged or non-privileged mode.") + privileged?: boolean; +} + +model Endpoint { + @doc("Protocol over which communication will happen over this endpoint") + protocol?: Protocol; + + @doc("Name of the Endpoint") + name?: string; + + @doc("Application port inside the container.") + target?: int32; + + @doc("Port over which the application is exposed from container.") + published?: int32; + + @doc("Host IP over which the application is exposed from the container") + hostIp?: string; +} + +model VolumeDefinition { + @doc("Type of Volume Definition. Possible Values: bind,volume,tmpfs,npipe") + type?: VolumeDefinitionType; + + @doc("Indicate whether to mount volume as readOnly. Default value for this is false.") + readOnly?: boolean; + + @doc("Source of the mount. For bind mounts this is the host path.") + source?: string; + + @doc("Target of the mount. For bind mounts this is the path in the container.") + target?: string; + + @doc("Consistency of the volume") + consistency?: string; + + @doc("Bind Options of the mount") + bind?: BindOptions; + + @doc("Volume Options of the mount") + volume?: VolumeOptions; + + @doc("tmpfs option of the mount") + tmpfs?: TmpfsOptions; +} + +model BindOptions { + @doc("Type of Bind Option") + propagation?: string; + + @doc("Indicate whether to create host path.") + createHostPath?: boolean; + + @doc("Mention the selinux options.") + selinux?: string; +} + +model VolumeOptions { + @doc("Indicate whether volume is nocopy") + nocopy?: boolean; +} + +model TmpfsOptions { + @doc("Mention the Tmpfs size") + size?: int32; +} + +@doc("Result of AmlCompute Nodes") +@pagedResult +model AmlComputeNodesInformation { + @doc("The collection of returned AmlCompute nodes details.") + @visibility("read") + @items + nodes?: AmlComputeNodeInformation[]; + + @doc("The continuation token.") + @visibility("read") + @nextLink + nextLink?: string; +} + +@doc("Compute node information related to a AmlCompute.") +model AmlComputeNodeInformation { + @doc("ID of the compute node.") + @visibility("read") + nodeId?: string; + + @doc("Private IP address of the compute node.") + @visibility("read") + privateIpAddress?: string; + + @doc("Public IP address of the compute node.") + @visibility("read") + publicIpAddress?: string; + + @doc("SSH port number of the node.") + @visibility("read") + port?: int32; + + @doc("State of the compute node. Values are idle, running, preparing, unusable, leaving and preempted.") + @visibility("read") + nodeState?: NodeState; + + @doc("ID of the Experiment running on the node, if any else null.") + @visibility("read") + runId?: string; +} + +@doc("Secrets related to a Machine Learning compute. Might differ for every type of compute.") +@discriminator("computeType") +model ComputeSecrets {} + +@doc("Stops compute instance after user defined period of inactivity.") +model IdleShutdownSetting { + @doc("Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days.") + idleTimeBeforeShutdown?: string; +} + +@doc("Container for code asset versions.") +model CodeContainer extends AssetContainer { + @doc("Provisioning state for the code container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +model AssetContainer extends ResourceBase { + @doc("Is the asset archived?") + @visibility("read", "create", "update") + isArchived?: boolean; + + @doc("The latest version inside this container.") + @visibility("read") + latestVersion?: string; + + @doc("The next auto incremental version") + @visibility("read") + nextVersion?: string; +} + +model ResourceBase { + @doc("The asset description text.") + description?: string; + + @doc("The asset property dictionary.") + properties?: Record; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + tags?: Record; +} + +@doc("Code asset version details.") +model CodeVersion extends AssetBase { + @doc("Uri where code is located") + codeUri?: string; + + @doc("Provisioning state for the code version.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +model AssetBase extends ResourceBase { + @doc("Specifies the lifecycle setting of managed data asset.") + @visibility("read", "create", "update") + autoDeleteSetting?: AutoDeleteSetting; + + @doc("If the name version are system generated (anonymous registration). For types where Stage is defined, when Stage is provided it will be used to populate IsAnonymous") + @visibility("read", "create") + isAnonymous?: boolean; + + @doc("Is the asset archived? For types where Stage is defined, when Stage is provided it will be used to populate IsArchived") + @visibility("read", "create", "update") + isArchived?: boolean; +} + +model AutoDeleteSetting { + @doc("When to check if an asset is expired") + @visibility("read", "create", "update") + condition?: AutoDeleteCondition; + + @doc("Expiration condition value.") + @visibility("read", "create", "update") + value?: string; +} + +model PendingUploadRequestDto { + @doc("If PendingUploadId = null then random guid will be used.") + pendingUploadId?: string; + + @doc("TemporaryBlobReference is the only supported type") + pendingUploadType?: PendingUploadType; +} + +model PendingUploadResponseDto { + @doc("Container level read, write, list SAS") + blobReferenceForConsumption?: BlobReferenceForConsumptionDto; + + @doc("ID for this upload request") + pendingUploadId?: string; + + @doc("TemporaryBlobReference is the only supported type") + pendingUploadType?: PendingUploadType; +} + +model BlobReferenceForConsumptionDto { + @doc(""" +Blob URI path for client to upload data. +Example: https://blob.windows.core.net/Container/Path +""") + blobUri?: string; + + @doc("Credential info to access storage account") + credential?: PendingUploadCredentialDto; + + @doc("Arm ID of the storage account to use") + storageAccountArmId?: string; +} + +@discriminator("credentialType") +model PendingUploadCredentialDto {} + +@doc(""" +Component container definition. + +""") +model ComponentContainer extends AssetContainer { + @doc("Provisioning state for the component container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Definition of a component version: defines resources that span component types.") +model ComponentVersion extends AssetBase { + @doc(""" +Defines Component definition details. + +""") + @visibility("read", "create") + componentSpec?: Record; + + @doc("Provisioning state for the component version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Stage in the component lifecycle") + stage?: string; +} + +@doc("Container for data asset versions.") +model DataContainer extends AssetContainer { + @doc("[Required] Specifies the type of data.") + @visibility("read", "create") + dataType: DataType; +} + +@doc("Data version base definition") +@discriminator("dataType") +model DataVersionBase extends AssetBase { + @doc("[Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + dataUri: string; + + @doc("Intellectual Property details. Used if data is an Intellectual Property.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("Stage in the data lifecycle assigned to this data asset") + stage?: string; +} + +@doc("Intellectual Property details for a resource.") +model IntellectualProperty { + @doc("Protection level of the Intellectual Property.") + protectionLevel?: ProtectionLevel; + + @doc("[Required] Publisher of the Intellectual Property. Must be the same as Registry publisher name.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + publisher: string; +} + +@doc("Container for environment specification versions.") +model EnvironmentContainer extends AssetContainer { + @doc("Provisioning state for the environment container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Environment version details.") +model EnvironmentVersion extends AssetBase { + @doc("Defines if image needs to be rebuilt based on base image changes.") + @visibility("read", "create") + autoRebuild?: AutoRebuildSetting; + + @doc("Configuration settings for Docker build context.") + @visibility("read", "create") + build?: BuildContext; + + @doc(""" +Standard configuration file used by Conda that lets you install any kind of package, including Python, R, and C/C++ packages. + +""") + @visibility("read", "create") + condaFile?: string; + + @doc(""" +Environment type is either user managed or curated by the Azure ML service + +""") + @visibility("read") + environmentType?: EnvironmentType; + + @doc(""" +Name of the image that will be used for the environment. + +""") + @visibility("read", "create") + image?: string; + + @doc("Defines configuration specific to inference.") + @visibility("read", "create") + inferenceConfig?: InferenceContainerProperties; + + @doc("Intellectual Property details. Used if environment is an Intellectual Property.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("The OS type of the environment.") + @visibility("read", "create") + osType?: OperatingSystemType; + + @doc("Provisioning state for the environment version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Stage in the environment lifecycle assigned to this environment") + stage?: string; +} + +@doc("Configuration settings for Docker build context") +model BuildContext { + @doc(""" +[Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. + +""") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + contextUri: string; + + @doc(""" +Path to the Dockerfile in the build context. + +""") + @visibility("read", "create") + dockerfilePath?: string; +} + +model InferenceContainerProperties { + @doc("The route to check the liveness of the inference server container.") + livenessRoute?: Route; + + @doc("The route to check the readiness of the inference server container.") + readinessRoute?: Route; + + @doc("The port to send the scoring requests to, within the inference server container.") + scoringRoute?: Route; +} + +model Route { + @doc("[Required] The path for the route.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + path: string; + + @doc("[Required] The port for the route.") + port: int32; +} + +model ModelContainer extends AssetContainer { + @doc("Provisioning state for the model container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Model asset version details.") +model ModelVersion extends AssetBase { + @doc("Mapping of model flavors to their properties.") + flavors?: Record; + + @doc("Intellectual Property details. Used if model is an Intellectual Property.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("Name of the training job which produced this model") + jobName?: string; + + @doc("The storage format for this entity. Used for NCD.") + modelType?: string; + + @doc("The URI path to the model contents.") + modelUri?: string; + + @doc("Provisioning state for the model version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Stage in the model lifecycle assigned to this model") + stage?: string; +} + +model FlavorData { + @doc("Model flavor-specific data.") + data?: Record; +} + +@doc("Model package operation request properties.") +model PackageRequest { + @doc("Base environment to start with.") + @visibility("read", "create") + baseEnvironmentSource?: BaseEnvironmentSource; + + @doc("Collection of environment variables.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("[Required] Inferencing server configurations.") + @visibility("read", "create") + inferencingServer: InferencingServer; + + @doc("Collection of inputs.") + @visibility("read", "create") + inputs?: ModelPackageInput[]; + + @doc("Model configuration including the mount mode.") + @visibility("read", "create") + modelConfiguration?: ModelConfiguration; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + @visibility("read", "create") + tags?: Record; + + @doc("[Required] Arm ID of the target environment to be created by package operation.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + targetEnvironmentId: string; +} + +@discriminator("baseEnvironmentSourceType") +model BaseEnvironmentSource {} + +@discriminator("serverType") +model InferencingServer {} + +@doc("Model package input options.") +model ModelPackageInput { + @doc("[Required] Type of the input included in the target image.") + inputType: PackageInputType; + + @doc("Input delivery mode of the input.") + mode?: PackageInputDeliveryMode; + + @doc("Relative mount path of the input in the target image.") + mountPath?: string; + + @doc("[Required] Location of the input.") + path: PackageInputPathBase; +} + +@discriminator("inputPathType") +model PackageInputPathBase {} + +@doc("Model configuration options.") +model ModelConfiguration { + @doc("Input delivery mode for the model.") + mode?: PackageInputDeliveryMode; + + @doc("Relative mounting path of the model in the target image.") + mountPath?: string; +} + +@doc("Package response returned after async package operation completes successfully.") +model PackageResponse { + @doc("Base environment to start with.") + @visibility("read") + baseEnvironmentSource?: BaseEnvironmentSource; + + @doc("Build id of the image build operation.") + @visibility("read") + buildId?: string; + + @doc("Build state of the image build operation.") + @visibility("read") + buildState?: PackageBuildState; + + @doc("Collection of environment variables.") + @visibility("read") + environmentVariables?: Record; + + @doc("Inferencing server configurations.") + @visibility("read") + inferencingServer?: InferencingServer; + + @doc("Collection of inputs.") + @visibility("read") + inputs?: ModelPackageInput[]; + + @doc("Log url of the image build operation.") + @visibility("read") + logUrl?: string; + + @doc("Model configuration including the mount mode.") + @visibility("read") + modelConfiguration?: ModelConfiguration; + + @doc("Tag dictionary. Tags can be added, removed, and updated.") + @visibility("read") + tags?: Record; + + @doc("Asset ID of the target environment created by package operation.") + @visibility("read") + targetEnvironmentId?: string; +} + +@doc("Batch endpoint configuration.") +model BatchEndpoint extends EndpointPropertiesBase { + @doc("Default values for Batch Endpoint.") + defaults?: BatchEndpointDefaults; + + @doc("Provisioning state for the endpoint.") + @visibility("read") + provisioningState?: EndpointProvisioningState; +} + +@doc("Batch endpoint default values") +model BatchEndpointDefaults { + @doc(""" +Name of the deployment that will be default for the endpoint. +This deployment will end up getting 100% traffic when the endpoint scoring URL is invoked. +""") + deploymentName?: string; +} + +@doc("Inference Endpoint base definition") +model EndpointPropertiesBase { + @doc("[Required] Use 'Key' for key based authentication and 'AMLToken' for Azure Machine Learning token-based authentication. 'Key' doesn't expire but 'AMLToken' does.") + authMode: EndpointAuthMode; + + @doc("Description of the inference endpoint.") + description?: string; + + @doc(""" +EndpointAuthKeys to set initially on an Endpoint. +This property will always be returned as null. AuthKey values must be retrieved using the ListKeys API. +""") + @visibility("create") + keys?: EndpointAuthKeys; + + @doc("Property dictionary. Properties can be added, but not removed or altered.") + properties?: Record; + + @doc("Endpoint URI.") + @visibility("read") + scoringUri?: string; + + @doc("Endpoint Swagger URI.") + @visibility("read") + swaggerUri?: string; +} + +@doc("Keys for endpoint authentication.") +model EndpointAuthKeys { + @doc("The primary key.") + @visibility("read", "create") + primaryKey?: string; + + @doc("The secondary key.") + @visibility("read", "create") + secondaryKey?: string; +} + +@doc("Strictly used in update requests.") +model PartialMinimalTrackedResourceWithIdentity + extends PartialMinimalTrackedResource { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: PartialManagedServiceIdentity; +} + +@doc("Managed service identity (system assigned and/or user assigned identities)") +model PartialManagedServiceIdentity { + @doc("Managed service identity (system assigned and/or user assigned identities)") + type?: ManagedServiceIdentityType; + + @doc("The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.") + userAssignedIdentities?: Record>; +} + +@doc("Strictly used in update requests.") +model PartialMinimalTrackedResource { + @doc("Resource tags.") + tags?: Record; +} + +@doc("Batch inference settings per deployment.") +model BatchDeployment extends EndpointDeploymentPropertiesBase { + @doc("Compute target for batch inference operation.") + compute?: string; + + @doc("Properties relevant to different deployment types.") + deploymentConfiguration?: BatchDeploymentConfiguration; + + @doc(""" +Error threshold, if the error count for the entire input goes above this value, +the batch inference will be aborted. Range is [-1, int.MaxValue]. +For FileDataset, this value is the count of file failures. +For TabularDataset, this value is the count of record failures. +If set to -1 (the lower bound), all failures during batch inference will be ignored. +""") + errorThreshold?: int32; + + @doc("Logging level for batch inference operation.") + loggingLevel?: BatchLoggingLevel; + + @doc("Indicates maximum number of parallelism per instance.") + maxConcurrencyPerInstance?: int32; + + @doc(""" +Size of the mini-batch passed to each batch invocation. +For FileDataset, this is the number of files per mini-batch. +For TabularDataset, this is the size of the records in bytes, per mini-batch. +""") + miniBatchSize?: int32; + + @doc("Reference to the model asset for the endpoint deployment.") + `model`?: AssetReferenceBase; + + @doc("Indicates how the output will be organized.") + outputAction?: BatchOutputAction; + + @doc("Customized output file name for append_row output action.") + outputFileName?: string; + + @doc("Provisioning state for the endpoint deployment.") + @visibility("read") + provisioningState?: DeploymentProvisioningState; + + @doc(""" +Indicates compute configuration for the job. +If not provided, will default to the defaults defined in ResourceConfiguration. +""") + resources?: DeploymentResourceConfiguration; + + @doc(""" +Retry Settings for the batch inference operation. +If not provided, will default to the defaults defined in BatchRetrySettings. +""") + retrySettings?: BatchRetrySettings; +} + +@doc("Properties relevant to different deployment types.") +@discriminator("deploymentConfigurationType") +model BatchDeploymentConfiguration {} + +@doc("Base definition for asset references.") +@discriminator("referenceType") +model AssetReferenceBase {} + +model DeploymentResourceConfiguration extends ResourceConfiguration {} + +model ResourceConfiguration { + @doc("Optional number of instances or nodes used by the compute target.") + @visibility("read", "create") + instanceCount?: int32; + + @doc("Optional type of VM used as supported by the compute target.") + @visibility("read", "create") + instanceType?: string; + + @doc("Locations where the job can run.") + @visibility("read", "create") + locations?: string[]; + + @doc(""" +Optional max allowed number of instances or nodes to be used by the compute target. +For use with elastic training, currently supported by PyTorch distribution type only. +""") + @visibility("read", "create") + maxInstanceCount?: int32; + + @doc("Additional properties bag.") + @visibility("read", "create") + properties?: Record>; +} + +@doc("Retry settings for a batch inference operation.") +model BatchRetrySettings { + @doc("Maximum retry count for a mini-batch") + maxRetries?: int32; + + @doc("Invocation timeout for a mini-batch, in ISO 8601 format.") + timeout?: duration; +} + +@doc("Base definition for endpoint deployment.") +model EndpointDeploymentPropertiesBase { + @doc("Code configuration for the endpoint deployment.") + codeConfiguration?: CodeConfiguration; + + @doc("Description of the endpoint deployment.") + description?: string; + + @doc("ARM resource ID of the environment specification for the endpoint deployment.") + environmentId?: string; + + @doc("Environment variables configuration for the deployment.") + environmentVariables?: Record; + + @doc("Property dictionary. Properties can be added, but not removed or altered.") + properties?: Record; +} + +@doc("Configuration for a scoring code asset.") +model CodeConfiguration { + @doc("ARM resource ID of the code asset.") + @visibility("read", "create") + codeId?: string; + + @doc("[Required] The script to execute on startup. eg. \"score.py\"") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + scoringScript: string; +} + +@doc("Strictly used in update requests.") +model PartialBatchDeploymentPartialMinimalTrackedResourceWithProperties { + @doc("Additional attributes of the entity.") + properties?: PartialBatchDeployment; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Mutable batch inference settings per deployment.") +model PartialBatchDeployment { + @doc("Description of the endpoint deployment.") + description?: string; +} + +@doc("Base definition for datastore contents configuration.") +@discriminator("datastoreType") +model Datastore extends ResourceBase { + @doc("[Required] Account credentials.") + credentials: DatastoreCredentials; + + @doc("Intellectual Property details.") + @visibility("read", "create") + intellectualProperty?: IntellectualProperty; + + @doc("Readonly property to indicate if datastore is the workspace default datastore") + @visibility("read") + isDefault?: boolean; +} + +@doc("Base definition for datastore credentials.") +@discriminator("credentialsType") +model DatastoreCredentials {} + +@doc("Base definition for datastore secrets.") +@discriminator("secretsType") +model DatastoreSecrets {} + +@doc("Dto object representing feature set") +model FeaturesetContainerProperties extends AssetContainer { + @doc("Provisioning state for the featureset container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Dto object representing feature") +model FeatureProperties extends ResourceBase { + @doc("Specifies type") + dataType?: FeatureDataType; + + @doc("Specifies name") + featureName?: string; +} + +@doc("Dto object representing feature set version") +model FeaturesetVersionProperties extends AssetBase { + @doc("Specifies list of entities") + entities?: string[]; + + @doc("Specifies the materialization settings") + materializationSettings?: MaterializationSettings; + + @doc("Provisioning state for the featureset version container.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Specifies the feature spec details") + specification?: FeaturesetSpecification; + + @doc("Specifies the asset stage") + stage?: string; +} + +model MaterializationSettings { + @doc("Specifies the notification details") + notification?: NotificationSetting; + + @doc("Specifies the compute resource settings") + resource?: MaterializationComputeResource; + + @doc("Specifies the schedule details") + schedule?: RecurrenceTrigger; + + @doc("Specifies the spark compute settings") + sparkConfiguration?: Record; + + @doc("Specifies the stores to which materialization should happen") + storeType?: MaterializationStoreType; +} + +@doc("Configuration for notification.") +model NotificationSetting { + @doc("Send email notification to user on specified notification type") + @visibility("read", "create") + emailOn?: EmailNotificationEnableType[]; + + @doc("This is the email recipient list which has a limitation of 499 characters in total concat with comma separator") + @visibility("read", "create") + emails?: string[]; + + @doc("Send webhook callback to a service. Key is a user-provided name for the webhook.") + @visibility("read", "create", "update") + webhooks?: Record; +} + +@doc("Webhook base") +@discriminator("webhookType") +model Webhook { + @doc("Send callback on a specified notification event") + @visibility("read", "create") + eventType?: string; +} + +@doc("Dto object representing compute resource") +model MaterializationComputeResource { + @doc("Specifies the instance type") + instanceType?: string; +} + +model RecurrenceTrigger extends TriggerBase { + @doc("[Required] The frequency to trigger schedule.") + frequency: RecurrenceFrequency; + + @doc("[Required] Specifies schedule interval in conjunction with frequency") + interval: int32; + + @doc("The recurrence schedule.") + schedule?: RecurrenceSchedule; + + @doc("[Required] ") + triggerType: "Recurrence"; +} + +model RecurrenceSchedule { + @doc("[Required] List of hours for the schedule.") + hours: int32[]; + + @doc("[Required] List of minutes for the schedule.") + minutes: int32[]; + + @doc("List of month days for the schedule") + monthDays?: int32[]; + + @doc("List of days for the schedule.") + weekDays?: WeekDay[]; +} + +@discriminator("triggerType") +model TriggerBase { + @doc(""" +Specifies end time of schedule in ISO 8601, but without a UTC offset. Refer https://en.wikipedia.org/wiki/ISO_8601. +Recommented format would be \"2022-06-01T00:00:01\" +If not present, the schedule will run indefinitely +""") + endTime?: string; + + @doc("Specifies start time of schedule in ISO 8601 format, but without a UTC offset.") + startTime?: string; + + @doc(""" +Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +""") + timeZone?: string; +} + +@doc("Dto object representing specification") +model FeaturesetSpecification { + @doc("Specifies the spec path") + path?: string; +} + +@doc("Request payload for creating a backfill request for a given feature set version") +model FeaturesetVersionBackfillRequest { + @doc("Specifies description") + description?: string; + + @doc("Specifies description") + displayName?: string; + + @doc("Specifies the backfill feature window to be materialized") + featureWindow?: FeatureWindow; + + @doc("Specifies the compute resource settings") + resource?: MaterializationComputeResource; + + @doc("Specifies the spark compute settings") + sparkConfiguration?: Record; + + @doc("Specifies the tags") + tags?: Record; +} + +@doc("Specifies the feature window") +model FeatureWindow { + @doc("Specifies the feature window end time") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + featureWindowEnd?: utcDateTime; + + @doc("Specifies the feature window start time") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + featureWindowStart?: utcDateTime; +} + +@doc("Dto object representing the feature set job") +model FeaturesetJob { + @doc("Specifies the created date") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDate?: utcDateTime; + + @doc("Specifies the display name") + displayName?: string; + + @doc("Specifies the duration") + duration?: duration; + + @doc("Specifies the experiment id") + experimentId?: string; + + @doc("Specifies the backfill feature window to be materialized") + featureWindow?: FeatureWindow; + + @doc("Specifies the job id") + jobId?: string; + + @doc("Specifies the job status") + status?: JobStatus; + + @doc("Specifies the tags if any") + tags?: Record; + + @doc("Specifies the feature store job type") + type?: FeaturestoreJobType; +} + +@doc("A paginated list of FeaturesetJob entities.") +model FeaturesetJobArmPaginatedResult is Azure.Core.Page; + +@doc("Dto object representing feature entity") +model FeaturestoreEntityContainerProperties extends AssetContainer { + @doc("Provisioning state for the featurestore entity container.") + @visibility("read") + provisioningState?: AssetProvisioningState; +} + +@doc("Dto object representing feature entity version") +model FeaturestoreEntityVersionProperties extends AssetBase { + @doc("Specifies index columns") + indexColumns?: IndexColumn[]; + + @doc("Provisioning state for the featurestore entity version.") + @visibility("read") + provisioningState?: AssetProvisioningState; + + @doc("Specifies the asset stage") + stage?: string; +} + +@doc("Dto object representing index column") +model IndexColumn { + @doc("Specifies the column name") + columnName?: string; + + @doc("Specifies the data type") + dataType?: FeatureDataType; +} + +@doc("Base definition for a job.") +@discriminator("jobType") +model JobBase extends ResourceBase { + @doc("ARM resource ID of the component resource.") + @visibility("read", "create") + componentId?: string; + + @doc("ARM resource ID of the compute resource.") + @visibility("read", "create") + computeId?: string; + + @doc("Display name of job.") + @visibility("read", "create") + displayName?: string; + + @doc("The name of the experiment the job belongs to. If not set, the job is placed in the \"Default\" experiment.") + @visibility("read", "create") + experimentName?: string; + + @doc(""" +Identity configuration. If set, this should be one of AmlToken, ManagedIdentity, UserIdentity or null. +Defaults to AmlToken if null. +""") + @visibility("read", "create") + identity?: IdentityConfiguration; + + @doc("Is the asset archived?") + @visibility("read", "create", "update") + isArchived?: boolean; + + @doc("Notification setting for the job") + @visibility("read", "create", "update") + notificationSetting?: NotificationSetting; + + @doc("Configuration for secrets to be made available during runtime.") + @visibility("read", "create") + secretsConfiguration?: Record; + + @doc(""" +List of JobEndpoints. +For local jobs, a job endpoint will have an endpoint value of FileStreamObject. +""") + services?: Record; + + @doc("Status of the job.") + @visibility("read") + status?: JobStatus; +} + +@doc("Base definition for identity configuration.") +@discriminator("identityType") +model IdentityConfiguration {} + +@doc("Secret Configuration definition.") +model SecretConfiguration { + @doc(""" +Secret Uri. +Sample Uri : https://myvault.vault.azure.net/secrets/mysecretname/secretversion +""") + @visibility("read", "create") + uri?: string; + + @doc("Name of secret in workspace key vault.") + @visibility("read", "create") + workspaceSecretName?: string; +} + +@doc("Job endpoint definition") +model JobService { + @doc("Url for endpoint.") + @visibility("read", "create") + endpoint?: string; + + @doc("Any error in the service.") + @visibility("read") + errorMessage?: string; + + @doc("Endpoint type.") + @visibility("read", "create") + jobServiceType?: string; + + @doc(""" +Nodes that user would like to start the service on. +If Nodes is not set or set to null, the service will only be started on leader node. +""") + nodes?: Nodes; + + @doc("Port for endpoint set by user.") + @visibility("read", "create") + port?: int32; + + @doc("Additional properties to set on the endpoint.") + properties?: Record; + + @doc("Status of endpoint.") + @visibility("read") + status?: string; +} + +@doc("Abstract Nodes definition") +@discriminator("nodesValueType") +model Nodes {} + +@doc("Azure Resource Manager resource envelope strictly used in update requests.") +model PartialJobBasePartialResource { + @doc("Additional attributes of the entity.") + properties?: PartialJobBase; +} + +@doc("Mutable base definition for a job.") +model PartialJobBase { + @doc("Mutable notification setting for the job") + notificationSetting?: PartialNotificationSetting; +} + +@doc("Mutable configuration for notification.") +model PartialNotificationSetting { + @doc("Send webhook callback to a service. Key is a user-provided name for the webhook.") + webhooks?: Record; +} + +@doc("Labeling job definition") +model LabelingJobProperties extends JobBase { + @doc("Created time of the job in UTC timezone.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("Configuration of data used in the job.") + @visibility("read", "create") + dataConfiguration?: LabelingDataConfiguration; + + @doc("Labeling instructions of the job.") + @visibility("read", "create", "update") + jobInstructions?: LabelingJobInstructions; + + @doc("Label categories of the job.") + @visibility("read", "create", "update") + labelCategories?: Record; + + @doc("Media type specific properties in the job.") + @visibility("read", "create") + labelingJobMediaProperties?: LabelingJobMediaProperties; + + @doc("Configuration of MLAssist feature in the job.") + @visibility("read", "create") + mlAssistConfiguration?: MLAssistConfiguration; + + @doc("Progress metrics of the job.") + @visibility("read") + progressMetrics?: ProgressMetrics; + + @doc("Internal id of the job(Previously called project).") + @visibility("read") + projectId?: string; + + @doc("Specifies the labeling job provisioning state.") + @visibility("read") + provisioningState?: JobProvisioningState; + + @doc("Status messages of the job.") + @visibility("read") + statusMessages?: StatusMessage[]; + + @doc("[Required] Specifies the type of job.") + jobType: "Labeling"; +} + +@doc("Labeling data configuration definition") +model LabelingDataConfiguration { + @doc("Resource Id of the data asset to perform labeling.") + @visibility("read", "create") + dataId?: string; + + @doc("Indicates whether to enable incremental data refresh.") + @visibility("read", "create", "update") + incrementalDataRefresh?: IncrementalDataRefresh; +} + +@doc("Instructions for labeling job") +model LabelingJobInstructions { + @doc("The link to a page with detailed labeling instructions for labelers.") + @visibility("read", "create", "update") + uri?: string; +} + +@doc("Label category definition") +model LabelCategory { + @doc("Dictionary of label classes in this category.") + @visibility("read", "create", "update") + classes?: Record; + + @doc("Display name of the label category.") + @visibility("read", "create") + displayName?: string; + + @doc("Indicates whether it is allowed to select multiple classes in this category.") + @visibility("read", "create", "update") + multiSelect?: MultiSelect; +} + +@doc("Label class definition") +model LabelClass { + @doc("Display name of the label class.") + @visibility("read", "create") + displayName?: string; + + @doc("Dictionary of subclasses of the label class.") + @visibility("read", "create", "update") + subclasses?: Record; +} + +@doc("Properties of a labeling job") +@discriminator("mediaType") +model LabelingJobMediaProperties {} + +@doc("Labeling MLAssist configuration definition") +@discriminator("mlAssist") +model MLAssistConfiguration {} + +@doc("Progress metrics definition") +model ProgressMetrics { + @doc("The completed datapoint count.") + @visibility("read") + completedDatapointCount?: int32; + + @doc("The time of last successful incremental data refresh in UTC.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + incrementalDataLastRefreshDateTime?: utcDateTime; + + @doc("The skipped datapoint count.") + @visibility("read") + skippedDatapointCount?: int32; + + @doc("The total datapoint count.") + @visibility("read") + totalDatapointCount?: int32; +} + +@doc("Active message associated with project") +model StatusMessage { + @doc("Service-defined message code.") + @visibility("read") + code?: string; + + @doc("Time in UTC at which the message was created.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdDateTime?: utcDateTime; + + @doc("Severity level of message.") + @visibility("read") + level?: StatusMessageLevel; + + @doc("A human-readable representation of the message code.") + @visibility("read") + message?: string; +} + +@discriminator("format") +model ExportSummary { + @doc("The time when the export was completed.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + endDateTime?: utcDateTime; + + @doc("The total number of labeled datapoints exported.") + @visibility("read") + exportedRowCount?: int32; + + @doc("Name and identifier of the job containing exported labels.") + @visibility("read") + labelingJobId?: string; + + @doc("The time when the export was requested.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + startDateTime?: utcDateTime; +} + +@doc("Online endpoint configuration") +model OnlineEndpoint extends EndpointPropertiesBase { + @doc(""" +ARM resource ID of the compute if it exists. +optional +""") + compute?: string; + + @doc("Percentage of traffic to be mirrored to each deployment without using returned scoring. Traffic values need to sum to utmost 50.") + mirrorTraffic?: Record; + + @doc("Provisioning state for the endpoint.") + @visibility("read") + provisioningState?: EndpointProvisioningState; + + @doc("Set to \"Enabled\" for endpoints that should allow public access when Private Link is enabled.") + publicNetworkAccess?: PublicNetworkAccessType; + + @doc("Percentage of traffic from endpoint to divert to each deployment. Traffic values need to sum to 100.") + traffic?: Record; +} + +@discriminator("endpointComputeType") +model OnlineDeployment extends EndpointDeploymentPropertiesBase { + @doc("If true, enables Application Insights logging.") + appInsightsEnabled?: boolean; + + @doc("The mdc configuration, we disable mdc when it's null.") + dataCollector?: DataCollector; + + @doc("If Enabled, allow egress public network access. If Disabled, this will create secure egress. Default: Enabled.") + egressPublicNetworkAccess?: EgressPublicNetworkAccessType; + + @doc("Compute instance type.") + @visibility("read", "create") + instanceType?: string; + + @doc("Liveness probe monitors the health of the container regularly.") + livenessProbe?: ProbeSettings; + + @doc("The URI path to the model.") + `model`?: string; + + @doc("The path to mount the model in custom container.") + modelMountPath?: string; + + @doc("Provisioning state for the endpoint deployment.") + @visibility("read") + provisioningState?: DeploymentProvisioningState; + + @doc("Readiness probe validates if the container is ready to serve traffic. The properties and defaults are the same as liveness probe.") + readinessProbe?: ProbeSettings; + + @doc("Request settings for the deployment.") + requestSettings?: OnlineRequestSettings; + + @doc(""" +Scale settings for the deployment. +If it is null or not provided, +it defaults to TargetUtilizationScaleSettings for KubernetesOnlineDeployment +and to DefaultScaleSettings for ManagedOnlineDeployment. +""") + scaleSettings?: OnlineScaleSettings; +} + +model DataCollector { + @doc(""" +[Required] The collection configuration. Each collection has it own configuration to collect model data and the name of collection can be arbitrary string. +Model data collector can be used for either payload logging or custom logging or both of them. Collection request and response are reserved for payload logging, others are for custom logging. +""") + collections: Record; + + @doc("The request logging configuration for mdc, it includes advanced logging settings for all collections. It's optional.") + requestLogging?: RequestLogging; + + @doc(""" +When model data is collected to blob storage, we need to roll the data to different path to avoid logging all of them in a single blob file. +If the rolling rate is hour, all data will be collected in the blob path /yyyy/MM/dd/HH/. +If it's day, all data will be collected in blob path /yyyy/MM/dd/. +The other benefit of rolling path is that model monitoring ui is able to select a time range of data very quickly. +""") + rollingRate?: RollingRateType; +} + +model Collection { + @doc("The msi client id used to collect logging to blob storage. If it's null,backend will pick a registered endpoint identity to auth.") + clientId?: string; + + @doc("Enable or disable data collection.") + dataCollectionMode?: DataCollectionMode; + + @doc("The data asset arm resource id. Client side will ensure data asset is pointing to the blob storage, and backend will collect data to the blob storage.") + dataId?: string; + + @doc("The sampling rate for collection. Sampling rate 1.0 means we collect 100% of data by default.") + samplingRate?: float32; +} + +model RequestLogging { + @doc("For payload logging, we only collect payload by default. If customers also want to collect the specified headers, they can set them in captureHeaders so that backend will collect those headers along with payload.") + captureHeaders?: string[]; +} + +@doc("Deployment container liveness/readiness probe configuration.") +model ProbeSettings { + @doc("The number of failures to allow before returning an unhealthy status.") + failureThreshold?: int32; + + @doc("The delay before the first probe in ISO 8601 format.") + initialDelay?: duration; + + @doc("The length of time between probes in ISO 8601 format.") + period?: duration; + + @doc("The number of successful probes before returning a healthy status.") + successThreshold?: int32; + + @doc("The probe timeout in ISO 8601 format.") + timeout?: duration; +} + +@doc("Online deployment scoring requests configuration.") +model OnlineRequestSettings { + @doc("The number of maximum concurrent requests per node allowed per deployment. Defaults to 1.") + maxConcurrentRequestsPerInstance?: int32; + + @doc(""" +The maximum amount of time a request will stay in the queue in ISO 8601 format. +Defaults to 500ms. +""") + maxQueueWait?: duration; + + @doc(""" +The scoring timeout in ISO 8601 format. +Defaults to 5000ms. +""") + requestTimeout?: duration; +} + +@doc("Online deployment scaling configuration.") +@discriminator("scaleType") +model OnlineScaleSettings {} + +@doc("Strictly used in update requests.") +model PartialMinimalTrackedResourceWithSku + extends PartialMinimalTrackedResource { + @doc("Sku details required for ARM contract for Autoscaling.") + sku?: PartialSku; +} + +@doc("Common SKU definition.") +model PartialSku { + @doc("If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted.") + capacity?: int32; + + @doc("If the service has different generations of hardware, for the same SKU, then that can be captured here.") + family?: string; + + @doc("The name of the SKU. Ex - P3. It is typically a letter+number code.") + name?: string; + + @doc("The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code.") + size?: string; + + @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") + tier?: SkuTier; +} + +model DeploymentLogsRequest { + @doc("The type of container to retrieve logs from.") + containerType?: ContainerType; + + @doc("The maximum number of lines to tail.") + tail?: int32; +} + +model DeploymentLogs { + @doc("The retrieved online deployment logs.") + content?: string; +} + +@doc("A paginated list of SkuResource entities.") +model SkuResourceArmPaginatedResult is Azure.Core.Page; + +@doc("Fulfills ARM Contract requirement to list all available SKUS for a resource.") +model SkuResource { + @doc("Gets or sets the Sku Capacity.") + capacity?: SkuCapacity; + + @doc("The resource type name.") + @visibility("read") + resourceType?: string; + + @doc("Gets or sets the Sku.") + sku?: SkuSetting; +} + +@doc("SKU capacity information") +model SkuCapacity { + @doc("Gets or sets the default capacity.") + default?: int32; + + @doc("Gets or sets the maximum.") + maximum?: int32; + + @doc("Gets or sets the minimum.") + minimum?: int32; + + @doc("Gets or sets the type of the scale.") + scaleType?: SkuScaleType; +} + +@doc("SkuSetting fulfills the need for stripped down SKU info in ARM contract.") +model SkuSetting { + @doc("[Required] The name of the SKU. Ex - P3. It is typically a letter+number code.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + name: string; + + @doc("This field is required to be implemented by the Resource Provider if the service has more than one tier, but is not required on a PUT.") + tier?: SkuTier; +} + +model RegenerateEndpointKeysRequest { + @doc("[Required] Specification for which type of key to generate. Primary or Secondary.") + keyType: KeyType; + + @doc("The value the key is set to.") + keyValue?: string; +} + +@doc("Service Token") +model EndpointAuthToken { + @doc("Access token for endpoint authentication.") + accessToken?: string; + + @doc("Access token expiry time (UTC).") + expiryTimeUtc?: plainTime; + + @doc("Refresh access token after time (UTC).") + refreshAfterTimeUtc?: plainTime; + + @doc("Access token type.") + tokenType?: string; +} + +@doc("Base definition of a schedule") +model ScheduleProperties extends ResourceBase { + @doc("[Required] Specifies the action of the schedule") + @visibility("read", "create", "update") + action: ScheduleActionBase; + + @doc("Display name of schedule.") + @visibility("read", "create") + displayName?: string; + + @doc("Is the schedule enabled?") + @visibility("read", "create", "update") + isEnabled?: boolean; + + @doc("Provisioning state for the schedule.") + @visibility("read") + provisioningState?: ScheduleProvisioningStatus; + + @doc("[Required] Specifies the trigger details") + @visibility("read", "create", "update") + trigger: TriggerBase; +} + +@discriminator("actionType") +model ScheduleActionBase {} + +@doc("Details of the Registry") +model RegistryProperties { + @doc("Discovery URL for the Registry") + discoveryUrl?: string; + + @doc("IntellectualPropertyPublisher for the registry") + intellectualPropertyPublisher?: string; + + @doc("ResourceId of the managed RG if the registry has system created resources") + managedResourceGroup?: ArmResourceId; + + @doc("MLFlow Registry URI for the Registry") + mlFlowRegistryUri?: string; + + @doc("Private endpoint connections info used for pending connections in private link portal") + privateEndpointConnections?: RegistryPrivateEndpointConnection[]; + + @doc(""" +Is the Registry accessible from the internet? +Possible values: \"Enabled\" or \"Disabled\" +""") + publicNetworkAccess?: string; + + @doc("Details of each region the registry is in") + regionDetails?: RegistryRegionArmDetails[]; +} + +@doc("ARM ResourceId of a resource") +model ArmResourceId { + @doc(""" +Arm ResourceId is in the format \"/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Storage/storageAccounts/{StorageAccountName}\" +or \"/subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{AcrName}\" +""") + resourceId?: string; +} + +@doc("Private endpoint connection definition.") +model RegistryPrivateEndpointConnection { + @doc(""" +This is the private endpoint connection name created on SRP +Full resource id: /subscriptions/{subId}/resourceGroups/{rgName}/providers/Microsoft.MachineLearningServices/{resourceType}/{resourceName}/privateEndpointConnections/{peConnectionName} +""") + id?: string; + + @doc("Same as workspace location.") + @visibility("read", "create") + location?: string; + + @doc("Properties of the Private Endpoint Connection") + properties?: RegistryPrivateEndpointConnectionProperties; +} + +@doc("Properties of the Private Endpoint Connection") +model RegistryPrivateEndpointConnectionProperties { + @doc("The group ids") + groupIds?: string[]; + + @doc("The PE network resource that is linked to this PE connection.") + privateEndpoint?: PrivateEndpointResource; + + @doc("The connection state.") + privateLinkServiceConnectionState?: RegistryPrivateLinkServiceConnectionState; + + @doc("One of null, \"Succeeded\", \"Provisioning\", \"Failed\". While not approved, it's null.") + provisioningState?: string; +} + +@doc("The PE network resource that is linked to this PE connection.") +model PrivateEndpointResource extends PrivateEndpoint { + @doc("The subnetId that the private endpoint is connected to.") + subnetArmId?: string; +} + +@doc("The Private Endpoint resource.") +model PrivateEndpoint { + @doc("The ARM identifier for Private Endpoint") + @visibility("read") + id?: string; +} + +@doc("The connection state.") +model RegistryPrivateLinkServiceConnectionState { + @doc("Some RP chose \"None\". Other RPs use this for region expansion.") + actionsRequired?: string; + + @doc("User-defined message that, per NRP doc, may be used for approval-related message.") + description?: string; + + @doc("Connection status of the service consumer with the service provider") + status?: EndpointServiceConnectionStatus; +} + +@doc("Details for each region the registry is in") +model RegistryRegionArmDetails { + @doc("List of ACR accounts") + acrDetails?: AcrDetails[]; + + @doc("The location where the registry exists") + location?: string; + + @doc("List of storage accounts") + storageAccountDetails?: StorageAccountDetails[]; +} + +@doc("Details of ACR account to be used for the Registry") +model AcrDetails { + @doc("Details of system created ACR account to be used for the Registry") + systemCreatedAcrAccount?: SystemCreatedAcrAccount; + + @doc("Details of user created ACR account to be used for the Registry. Not supported in most cases and will throw 400 error if provided.") + userCreatedAcrAccount?: UserCreatedAcrAccount; +} + +model SystemCreatedAcrAccount { + @doc("Name of the ACR account") + acrAccountName?: string; + + @doc("SKU of the ACR account") + acrAccountSku?: string; + + @doc("This is populated once the ACR account is created.") + armResourceId?: ArmResourceId; +} + +model UserCreatedAcrAccount { + @doc("ARM ResourceId of a resource") + armResourceId?: ArmResourceId; +} + +@doc("Details of storage account to be used for the Registry") +model StorageAccountDetails { + @doc("Details of system created storage account to be used for the registry") + systemCreatedStorageAccount?: SystemCreatedStorageAccount; + + @doc("Details of user created storage account to be used for the registry. Not supported in most cases and will throw 400 error if provided.") + userCreatedStorageAccount?: UserCreatedStorageAccount; +} + +model SystemCreatedStorageAccount { + @doc("Public blob access allowed") + allowBlobPublicAccess?: boolean; + + @doc("This is populated once the storage account is created.") + armResourceId?: ArmResourceId; + + @doc("HNS enabled for storage account") + storageAccountHnsEnabled?: boolean; + + @doc("Name of the storage account") + storageAccountName?: string; + + @doc(""" +Allowed values: +\"Standard_LRS\", +\"Standard_GRS\", +\"Standard_RAGRS\", +\"Standard_ZRS\", +\"Standard_GZRS\", +\"Standard_RAGZRS\", +\"Premium_LRS\", +\"Premium_ZRS\" +""") + storageAccountType?: string; +} + +model UserCreatedStorageAccount { + @doc("ARM ResourceId of a resource") + armResourceId?: ArmResourceId; +} + +@doc("Strictly used in update requests.") +model PartialRegistryPartialTrackedResource { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: RegistryPartialManagedServiceIdentity; + + @doc("Sku details required for ARM contract for Autoscaling.") + sku?: PartialSku; + + @doc("Resource tags.") + tags?: Record; +} + +@doc("Managed service identity (system assigned and/or user assigned identities)") +model RegistryPartialManagedServiceIdentity extends ManagedServiceIdentity {} + +@doc("The List Aml user feature operation response.") +model ListAmlUserFeatureResult is Azure.Core.Page; + +@doc("Features enabled for a workspace") +model AmlUserFeature { + @doc("Specifies the feature ID") + id?: string; + + @doc("Specifies the feature name ") + displayName?: string; + + @doc("Describes the feature for user experience") + description?: string; +} + +@doc("Azure Machine Learning team account REST API operation") +model AmlOperation { + @doc("Gets or sets display name of operation") + display?: OperationDisplay; + + @doc("Indicates whether the operation applies to data-plane") + isDataAction?: boolean; + + @doc("Gets or sets operation name: {provider}/{resource}/{operation}") + name?: string; + + @doc("The intended executor of the operation: user/system") + origin?: string; +} + +@doc("The properties of a machine learning workspace.") +model WorkspaceProperties { + @doc("The flag to indicate whether to allow public access when behind VNet.") + allowPublicAccessWhenBehindVnet?: boolean; + + @doc("ARM id of the application insights associated with this workspace.") + applicationInsights?: string; + + associatedWorkspaces?: string[]; + containerRegistries?: string[]; + + @doc("ARM id of the container registry associated with this workspace.") + containerRegistry?: string; + + @doc("The description of this workspace.") + description?: string; + + @doc("Url for the discovery service to identify regional endpoints for machine learning experimentation services") + discoveryUrl?: string; + + enableDataIsolation?: boolean; + encryption?: EncryptionProperty; + existingWorkspaces?: string[]; + + @doc("Settings for feature store type workspace.") + featureStoreSettings?: FeatureStoreSettings; + + @doc("The friendly name for this workspace. This name in mutable") + friendlyName?: string; + + @doc("The flag to signal HBI data in the workspace and reduce diagnostic data collected by the service") + hbiWorkspace?: boolean; + + hubResourceId?: string; + + @doc("The compute name for image build") + imageBuildCompute?: string; + + @doc("ARM id of the key vault associated with this workspace. This cannot be changed once the workspace has been created") + keyVault?: string; + + keyVaults?: string[]; + + @doc("Managed Network settings for a machine learning workspace.") + managedNetwork?: ManagedNetworkSettings; + + @doc("The URI associated with this workspace that machine learning flow must point at to set up tracking.") + @visibility("read") + mlFlowTrackingUri?: string; + + @doc("The notebook info of Azure ML workspace.") + @visibility("read") + notebookInfo?: NotebookResourceInfo; + + @doc("The user assigned identity resource id that represents the workspace identity.") + primaryUserAssignedIdentity?: string; + + @doc("The list of private endpoint connections in the workspace.") + @visibility("read") + privateEndpointConnections?: PrivateEndpointConnection[]; + + @doc("Count of private connections in the workspace") + @visibility("read") + privateLinkCount?: int32; + + @doc("The current deployment state of workspace resource. The provisioningState is to indicate states for resource provisioning.") + @visibility("read") + provisioningState?: ProvisioningState; + + @doc("Whether requests from Public Network are allowed.") + publicNetworkAccess?: PublicNetworkAccessType; + + @doc("The service managed resource settings.") + serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; + + @doc("The name of the managed resource group created by workspace RP in customer subscription if the workspace is CMK workspace") + @visibility("read") + serviceProvisionedResourceGroup?: string; + + @doc("The list of shared private link resources in this workspace.") + sharedPrivateLinkResources?: SharedPrivateLinkResource[]; + + @doc("Retention time in days after workspace get soft deleted.") + softDeleteRetentionInDays?: int32; + + @doc("ARM id of the storage account associated with this workspace. This cannot be changed once the workspace has been created") + storageAccount?: string; + + storageAccounts?: string[]; + + @doc("If the storage associated with the workspace has hierarchical namespace(HNS) enabled.") + @visibility("read") + storageHnsEnabled?: boolean; + + @doc("The auth mode used for accessing the system datastores of the workspace.") + systemDatastoresAuthMode?: string; + + @doc("The tenant id associated with this workspace.") + @visibility("read") + tenantId?: string; + + @doc("Enabling v1_legacy_mode may prevent you from using features provided by the v2 API.") + v1LegacyMode?: boolean; + + @doc("WorkspaceHub's configuration object.") + workspaceHubConfig?: WorkspaceHubConfig; + + @doc("The immutable id associated with this workspace.") + @visibility("read") + workspaceId?: string; +} + +model EncryptionProperty { + @doc(""" +The byok cosmosdb account that customer brings to store customer's data +with encryption +""") + cosmosDbResourceId?: string; + + @doc("Identity to be used with the keyVault") + identity?: IdentityForCmk; + + @doc("KeyVault details to do the encryption") + keyVaultProperties: KeyVaultProperties; + + @doc(""" +The byok search account that customer brings to store customer's data +with encryption +""") + searchAccountResourceId?: string; + + @doc("Indicates whether or not the encryption is enabled for the workspace.") + status: EncryptionStatus; + + @doc(""" +The byok storage account that customer brings to store customer's data +with encryption +""") + storageAccountResourceId?: string; +} + +@doc("Identity object used for encryption.") +model IdentityForCmk { + @doc("UserAssignedIdentity to be used to fetch the encryption key from keyVault") + userAssignedIdentity?: string; +} + +@doc("Customer Key vault properties.") +model KeyVaultProperties { + @doc(""" +Currently, we support only SystemAssigned MSI. +We need this when we support UserAssignedIdentities +""") + identityClientId?: string; + + @doc("KeyVault key identifier to encrypt the data") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyIdentifier: string; + + @doc("KeyVault Arm Id that contains the data encryption key") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyVaultArmId: string; +} + +model FeatureStoreSettings { + computeRuntime?: ComputeRuntimeDto; + offlineStoreConnectionName?: string; + onlineStoreConnectionName?: string; +} + +model ComputeRuntimeDto { + sparkRuntimeVersion?: string; +} + +@doc("Managed Network settings for a machine learning workspace.") +model ManagedNetworkSettings { + @doc("Isolation mode for the managed network of a machine learning workspace.") + isolationMode?: IsolationMode; + + @visibility("read") + networkId?: string; + + @doc("Dictionary of ") + outboundRules?: Record; + + @doc("Status of the Provisioning for the managed network of a machine learning workspace.") + status?: ManagedNetworkProvisionStatus; +} + +@doc("Outbound Rule for the managed network of a machine learning workspace.") +@discriminator("type") +model OutboundRule { + @doc("Category of a managed network Outbound Rule of a machine learning workspace.") + category?: RuleCategory; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + status?: RuleStatus; +} + +@doc("Status of the Provisioning for the managed network of a machine learning workspace.") +model ManagedNetworkProvisionStatus { + sparkReady?: boolean; + + @doc("Status for the managed network of a machine learning workspace.") + status?: ManagedNetworkStatus; +} + +model NotebookResourceInfo { + fqdn?: string; + isPrivateLinkEnabled?: boolean; + + @doc("The error that occurs when preparing notebook.") + notebookPreparationError?: NotebookPreparationError; + + @doc("the data plane resourceId that used to initialize notebook component") + resourceId?: string; +} + +model NotebookPreparationError { + errorMessage?: string; + statusCode?: int32; +} + +@doc("Private endpoint connection properties.") +model PrivateEndpointConnectionProperties { + @doc("The Private Endpoint resource.") + privateEndpoint?: WorkspacePrivateEndpointResource; + + @doc("The connection state.") + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionState; + + @doc("The current provisioning state.") + @visibility("read") + provisioningState?: PrivateEndpointConnectionProvisioningState; +} + +@doc("The Private Endpoint resource.") +model WorkspacePrivateEndpointResource { + @doc("e.g. /subscriptions/{networkSubscriptionId}/resourceGroups/{rgName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}") + @visibility("read") + id?: string; + + @doc("The subnetId that the private endpoint is connected to.") + @visibility("read") + subnetArmId?: string; +} + +@doc("A collection of information about the state of the connection between service consumer and provider.") +model PrivateLinkServiceConnectionState { + @doc("Some RP chose \"None\". Other RPs use this for region expansion.") + actionsRequired?: string; + + @doc("User-defined message that, per NRP doc, may be used for approval-related message.") + description?: string; + + @doc("Connection status of the service consumer with the service provider") + status?: EndpointServiceConnectionStatus; +} + +model ServiceManagedResourcesSettings { + cosmosDb?: CosmosDbSettings; +} + +model CosmosDbSettings { + collectionsThroughput?: int32; +} + +model SharedPrivateLinkResource { + @doc("Unique name of the private link") + name?: string; + + @doc("Properties of a shared private link resource.") + properties?: SharedPrivateLinkResourceProperty; +} + +@doc("Properties of a shared private link resource.") +model SharedPrivateLinkResourceProperty { + @doc("group id of the private link") + groupId?: string; + + @doc("the resource id that private link links to") + privateLinkResourceId?: string; + + @doc("Request message") + requestMessage?: string; + + @doc("Connection status of the service consumer with the service provider") + status?: EndpointServiceConnectionStatus; +} + +@doc("WorkspaceHub's configuration object.") +model WorkspaceHubConfig { + additionalWorkspaceStorageAccounts?: string[]; + defaultWorkspaceResourceGroup?: string; +} + +@doc("The parameters for updating a machine learning workspace.") +model WorkspaceUpdateParameters { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: ManagedServiceIdentity; + + @doc("The properties that the machine learning workspace will be updated with.") + properties?: WorkspacePropertiesUpdateParameters; + + @doc("Optional. This field is required to be implemented by the RP because AML is supporting more than one tier") + sku?: Sku; + + @doc("The resource tags for the machine learning workspace.") + tags?: Record; +} + +@doc("The parameters for updating a machine learning workspace.") +model WorkspacePropertiesUpdateParameters { + @doc("ARM id of the application insights associated with this workspace.") + applicationInsights?: string; + + @doc("ARM id of the container registry associated with this workspace.") + containerRegistry?: string; + + @doc("The description of this workspace.") + description?: string; + + enableDataIsolation?: boolean; + encryption?: EncryptionUpdateProperties; + + @doc("Settings for feature store type workspace.") + featureStoreSettings?: FeatureStoreSettings; + + @doc("The friendly name for this workspace. This name in mutable") + friendlyName?: string; + + @doc("The compute name for image build") + imageBuildCompute?: string; + + @doc("Managed Network settings for a machine learning workspace.") + managedNetwork?: ManagedNetworkSettings; + + @doc("The user assigned identity resource id that represents the workspace identity.") + primaryUserAssignedIdentity?: string; + + @doc("Whether requests from Public Network are allowed.") + publicNetworkAccess?: PublicNetworkAccessType; + + @doc("The service managed resource settings.") + serviceManagedResourcesSettings?: ServiceManagedResourcesSettings; + + @doc("Retention time in days after workspace get soft deleted.") + softDeleteRetentionInDays?: int32; + + @doc("Enabling v1_legacy_mode may prevent you from using features provided by the v2 API.") + v1LegacyMode?: boolean; +} + +model EncryptionUpdateProperties { + keyVaultProperties: EncryptionKeyVaultUpdateProperties; +} + +model EncryptionKeyVaultUpdateProperties { + @minLength(1) + @pattern("[a-zA-Z0-9_]") + keyIdentifier: string; +} + +@discriminator("authType") +model WorkspaceConnectionPropertiesV2 { + @doc("Category of the connection") + category?: ConnectionCategory; + + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + expiryTime?: utcDateTime; + + @doc("Any object") + metadata?: Record; + + target?: string; +} + +@doc("The properties that the machine learning workspace connection will be updated with.") +model WorkspaceConnectionUpdateParameter { + @doc("The properties that the machine learning workspace connection will be updated with.") + properties?: WorkspaceConnectionPropertiesV2; +} + +@doc("Parameters to diagnose a workspace") +model DiagnoseWorkspaceParameters { + value?: DiagnoseRequestProperties; +} + +model DiagnoseRequestProperties { + @doc("Setting for diagnosing dependent application insights") + applicationInsights?: Record; + + @doc("Setting for diagnosing dependent container registry") + containerRegistry?: Record; + + @doc("Setting for diagnosing dns resolution") + dnsResolution?: Record; + + @doc("Setting for diagnosing dependent key vault") + keyVault?: Record; + + @doc("Setting for diagnosing network security group") + nsg?: Record; + + @doc("Setting for diagnosing unclassified category of problems") + others?: Record; + + @doc("Setting for diagnosing resource lock") + resourceLock?: Record; + + @doc("Setting for diagnosing dependent storage account") + storageAccount?: Record; + + @doc("Setting for diagnosing user defined routing") + udr?: Record; +} + +model DiagnoseResponseResult { + value?: DiagnoseResponseResultValue; +} + +model DiagnoseResponseResultValue { + userDefinedRouteResults?: DiagnoseResult[]; + networkSecurityRuleResults?: DiagnoseResult[]; + resourceLockResults?: DiagnoseResult[]; + dnsResolutionResults?: DiagnoseResult[]; + storageAccountResults?: DiagnoseResult[]; + keyVaultResults?: DiagnoseResult[]; + containerRegistryResults?: DiagnoseResult[]; + applicationInsightsResults?: DiagnoseResult[]; + otherResults?: DiagnoseResult[]; +} + +@doc("Result of Diagnose") +model DiagnoseResult { + @doc("Code for workspace setup error") + @visibility("read") + code?: string; + + @doc("Level of workspace setup error") + @visibility("read") + level?: DiagnoseResultLevel; + + @doc("Message of workspace setup error") + @visibility("read") + message?: string; +} + +model ListWorkspaceKeysResult { + @doc("The access key of the workspace app insights") + @visibility("read") + appInsightsInstrumentationKey?: string; + + containerRegistryCredentials?: RegistryListCredentialsResult; + notebookAccessKeys?: ListNotebookKeysResult; + + @doc("The arm Id key of the workspace storage") + @visibility("read") + userStorageArmId?: string; + + @doc("The access key of the workspace storage") + @visibility("read") + userStorageKey?: string; +} + +model RegistryListCredentialsResult { + @doc("The location of the workspace ACR") + @visibility("read") + location?: string; + + passwords?: Password[]; + + @doc("The username of the workspace ACR") + @visibility("read") + username?: string; +} + +model Password { + @visibility("read") + name?: string; + + @visibility("read") + value?: string; +} + +model ListNotebookKeysResult { + @doc("The primary access key of the Notebook") + @visibility("read") + primaryAccessKey?: string; + + @doc("The secondary access key of the Notebook") + @visibility("read") + secondaryAccessKey?: string; +} + +model NotebookAccessTokenResult { + @visibility("read") + accessToken?: string; + + @visibility("read") + expiresIn?: int32; + + @visibility("read") + hostName?: string; + + @visibility("read") + notebookResourceId?: string; + + @visibility("read") + publicDns?: string; + + @visibility("read") + refreshToken?: string; + + @visibility("read") + scope?: string; + + @visibility("read") + tokenType?: string; +} + +model ListStorageAccountKeysResult { + @doc("The access key of the storage") + @visibility("read") + userStorageKey?: string; +} + +model ExternalFqdnResponse { + value?: FqdnEndpointsPropertyBag[]; +} + +@doc("Property bag for FQDN endpoints result") +model FqdnEndpointsPropertyBag { + properties?: FqdnEndpoints; +} + +model FqdnEndpoints { + category?: string; + endpoints?: FqdnEndpoint[]; +} + +model FqdnEndpoint { + domainName?: string; + endpointDetails?: FqdnEndpointDetail[]; +} + +model FqdnEndpointDetail { + port?: int32; +} + +@doc("A list of private link resources") +@pagedResult +model PrivateLinkResourceListResult { + @items + value?: PrivateLinkResource[]; +} + +@doc("A private link resource") +model PrivateLinkResource extends Resource { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: ManagedServiceIdentity; + + @doc("Same as workspace location.") + location?: string; + + @doc("Properties of a private link resource.") + properties?: PrivateLinkResourceProperties; + + @doc("Optional. This field is required to be implemented by the RP because AML is supporting more than one tier") + sku?: Sku; + + @doc("Dictionary of ") + tags?: Record; +} + +@doc("Properties of a private link resource.") +model PrivateLinkResourceProperties { + @doc("The private link resource group id.") + @visibility("read") + groupId?: string; + + @doc("The private link resource required member names.") + @visibility("read") + requiredMembers?: string[]; + + @doc("The private link resource Private link DNS zone name.") + requiredZoneNames?: string[]; +} + +@doc("Managed Network Provisioning options for managed network of a machine learning workspace.") +model ManagedNetworkProvisionOptions { + includeSpark?: boolean; +} + +@doc("Represents a resource ID. For example, for a subnet, it is the resource URL for the subnet.") +model ResourceId { + @doc("The ID of the resource") + id: string; +} + +@doc("A Machine Learning compute based on AKS.") +model AKS extends Compute { + ...AKSSchema; + + @doc("The type of compute") + computeType: "AKS"; +} + +model AKSSchema { + @doc("AKS properties") + properties?: AKSSchemaProperties; +} + +@doc("AKS properties") +model AKSSchemaProperties { + @doc("Cluster full qualified domain name") + clusterFqdn?: string; + + @doc("System services") + @visibility("read") + systemServices?: SystemService[]; + + @doc("Number of agents") + agentCount?: int32; + + @doc("Agent virtual machine size") + agentVmSize?: string; + + @doc("Intended usage of the cluster") + clusterPurpose?: ClusterPurpose; + + @doc("SSL configuration") + sslConfiguration?: SslConfiguration; + + @doc("AKS networking configuration for vnet") + aksNetworkingConfiguration?: AksNetworkingConfiguration; + + @doc("Load Balancer Type") + loadBalancerType?: LoadBalancerType; + + @doc("Load Balancer Subnet") + loadBalancerSubnet?: string; +} + +@doc("A system service running on a compute.") +model SystemService { + @doc("The type of this system service.") + @visibility("read") + systemServiceType?: string; + + @doc("Public IP address") + @visibility("read") + publicIpAddress?: string; + + @doc("The version for this type.") + @visibility("read") + version?: string; +} + +@doc("The ssl configuration for scoring") +model SslConfiguration { + @doc("Enable or disable ssl for scoring") + status?: SslConfigStatus; + + @doc("Cert data") + cert?: string; + + @doc("Key data") + key?: string; + + @doc("CNAME of the cert") + cname?: string; + + @doc("Leaf domain label of public endpoint") + leafDomainLabel?: string; + + @doc("Indicates whether to overwrite existing domain label.") + overwriteExistingDomain?: boolean; +} + +@doc("Advance configuration for AKS networking") +model AksNetworkingConfiguration { + @doc("Virtual network subnet resource ID the compute nodes belong to") + subnetId?: string; + + @doc("A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.") + @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") + serviceCidr?: string; + + @doc("An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified in serviceCidr.") + @pattern("^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$") + dnsServiceIP?: string; + + @doc("A CIDR notation IP range assigned to the Docker bridge network. It must not overlap with any Subnet IP ranges or the Kubernetes service address range.") + @pattern("^([0-9]{1,3}\\.){3}[0-9]{1,3}(\\/([0-9]|[1-2][0-9]|3[0-2]))?$") + dockerBridgeCidr?: string; +} + +@doc("A Machine Learning compute based on Kubernetes Compute.") +model Kubernetes extends Compute { + ...KubernetesSchema; + + @doc("The type of compute") + computeType: "Kubernetes"; +} + +@doc("Kubernetes Compute Schema") +model KubernetesSchema { + @doc("Properties of Kubernetes") + properties?: KubernetesProperties; +} + +@doc("Kubernetes properties") +model KubernetesProperties { + @doc("Relay connection string.") + relayConnectionString?: string; + + @doc("ServiceBus connection string.") + serviceBusConnectionString?: string; + + @doc("Extension principal-id.") + extensionPrincipalId?: string; + + @doc("Extension instance release train.") + extensionInstanceReleaseTrain?: string; + + @doc("VC name.") + vcName?: string; + + @doc("Compute namespace") + `namespace`?: string; + + @doc("Default instance type") + defaultInstanceType?: string; + + @doc("Instance Type Schema") + instanceTypes?: Record; +} + +@doc("Instance type schema.") +model InstanceTypeSchema { + @doc("Node Selector") + nodeSelector?: Record; + + @doc("Resource requests/limits for this instance type") + resources?: InstanceTypeSchemaResources; +} + +@doc("Resource requests/limits for this instance type") +model InstanceTypeSchemaResources { + @doc("Resource requests for this instance type") + requests?: Record; + + @doc("Resource limits for this instance type") + limits?: Record; +} + +@doc("AML Compute properties") +model AmlComputeProperties { + @doc("Compute OS Type") + osType?: OsType; + + @doc("Virtual Machine Size") + vmSize?: string; + + @doc("Virtual Machine priority") + vmPriority?: VmPriority; + + @doc("Virtual Machine image for AML Compute - windows only") + virtualMachineImage?: VirtualMachineImage; + + @doc("Network is isolated or not") + isolatedNetwork?: boolean; + + @doc("Scale settings for AML Compute") + scaleSettings?: ScaleSettings; + + @doc("Credentials for an administrator user account that will be created on each compute node.") + userAccountCredentials?: UserAccountCredentials; + + @doc("Virtual network subnet resource ID the compute nodes belong to.") + subnet?: ResourceId; + + @doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on all nodes of the cluster. Enabled - Indicates that the public ssh port is open on all nodes of the cluster. NotSpecified - Indicates that the public ssh port is closed on all nodes of the cluster if VNet is defined, else is open all public nodes. It can be default only during cluster creation time, after creation it will be either enabled or disabled.") + remoteLoginPortPublicAccess?: RemoteLoginPortPublicAccess; + + @doc("Allocation state of the compute. Possible values are: steady - Indicates that the compute is not resizing. There are no changes to the number of compute nodes in the compute in progress. A compute enters this state when it is created and when no operations are being performed on the compute to change the number of compute nodes. resizing - Indicates that the compute is resizing; that is, compute nodes are being added to or removed from the compute.") + @visibility("read") + allocationState?: AllocationState; + + @doc("The time at which the compute entered its current allocation state.") + @visibility("read") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + allocationStateTransitionTime?: utcDateTime; + + @doc("Collection of errors encountered by various compute nodes during node setup.") + @visibility("read") + errors?: ErrorResponse[]; + + @doc("The number of compute nodes currently assigned to the compute.") + @visibility("read") + currentNodeCount?: int32; + + @doc("The target number of compute nodes for the compute. If the allocationState is resizing, this property denotes the target node count for the ongoing resize operation. If the allocationState is steady, this property denotes the target node count for the previous resize operation.") + @visibility("read") + targetNodeCount?: int32; + + @doc("Counts of various node states on the compute.") + @visibility("read") + nodeStateCounts?: NodeStateCounts; + + @doc("Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs.") + enableNodePublicIp?: boolean; + + @doc("A property bag containing additional properties.") + propertyBag?: Record; +} + +@doc("Virtual Machine image for Windows AML Compute") +model VirtualMachineImage { + @doc("Virtual Machine image path") + id: string; +} + +@doc("Settings for user account that gets created on each on the nodes of a compute.") +model UserAccountCredentials { + @doc("Name of the administrator user account which can be used to SSH to nodes.") + adminUserName: string; + + @doc("SSH public key of the administrator user account.") + adminUserSshPublicKey?: string; + + @doc("Password of the administrator user account.") + adminUserPassword?: string; +} + +@doc("Counts of various compute node states on the amlCompute.") +model NodeStateCounts { + @doc("Number of compute nodes in idle state.") + @visibility("read") + idleNodeCount?: int32; + + @doc("Number of compute nodes which are running jobs.") + @visibility("read") + runningNodeCount?: int32; + + @doc("Number of compute nodes which are being prepared.") + @visibility("read") + preparingNodeCount?: int32; + + @doc("Number of compute nodes which are in unusable state.") + @visibility("read") + unusableNodeCount?: int32; + + @doc("Number of compute nodes which are leaving the amlCompute.") + @visibility("read") + leavingNodeCount?: int32; + + @doc("Number of compute nodes which are in preempted state.") + @visibility("read") + preemptedNodeCount?: int32; +} + +@doc("An Azure Machine Learning compute.") +model AmlCompute extends Compute { + ...AmlComputeSchema; + + @doc("The type of compute") + computeType: "AmlCompute"; +} + +@doc("Properties(top level) of AmlCompute") +model AmlComputeSchema { + @doc("Properties of AmlCompute") + properties?: AmlComputeProperties; +} + +@doc("Compute Instance properties") +model ComputeInstanceProperties { + @doc("Virtual Machine Size") + vmSize?: string; + + @doc("Virtual network subnet resource ID the compute nodes belong to.") + subnet?: ResourceId; + + @doc("Policy for sharing applications on this compute instance among users of parent workspace. If Personal, only the creator can access applications on this compute instance. When Shared, any workspace user can access applications on this instance depending on his/her assigned role.") + applicationSharingPolicy?: ApplicationSharingPolicy; + + @doc("Specifies settings for autologger.") + autologgerSettings?: ComputeInstanceAutologgerSettings; + + @doc("Specifies policy and settings for SSH access.") + sshSettings?: ComputeInstanceSshSettings; + + @doc("List of Custom Services added to the compute.") + customServices?: CustomService[]; + + @doc("Returns metadata about the operating system image for this compute instance.") + @visibility("read") + osImageMetadata?: ImageMetadata; + + @doc("Describes all connectivity endpoints available for this ComputeInstance.") + @visibility("read") + connectivityEndpoints?: ComputeInstanceConnectivityEndpoints; + + @doc("Describes available applications and their endpoints on this ComputeInstance.") + @visibility("read") + applications?: ComputeInstanceApplication[]; + + @doc("Describes information on user who created this ComputeInstance.") + @visibility("read") + createdBy?: ComputeInstanceCreatedBy; + + @doc("Collection of errors encountered on this ComputeInstance.") + @visibility("read") + errors?: ErrorResponse[]; + + @doc("The current state of this ComputeInstance.") + @visibility("read") + state?: ComputeInstanceState; + + @doc("The Compute Instance Authorization type. Available values are personal (default).") + computeInstanceAuthorizationType?: ComputeInstanceAuthorizationType; + + @doc("Settings for a personal compute instance.") + personalComputeInstanceSettings?: PersonalComputeInstanceSettings; + + @doc("Details of customized scripts to execute for setting up the cluster.") + setupScripts?: SetupScripts; + + @doc("The last operation on ComputeInstance.") + @visibility("read") + lastOperation?: ComputeInstanceLastOperation; + + @doc("The list of schedules to be applied on the computes.") + schedules?: ComputeSchedules; + + @doc("Stops compute instance after user defined period of inactivity. Time is defined in ISO8601 format. Minimum is 15 min, maximum is 3 days.") + idleTimeBeforeShutdown?: string; + + @doc("Enable or disable node public IP address provisioning. Possible values are: Possible values are: true - Indicates that the compute nodes will have public IPs provisioned. false - Indicates that the compute nodes will have a private endpoint and no public IPs.") + enableNodePublicIp?: boolean; + + @doc("Describes informations of containers on this ComputeInstance.") + @visibility("read") + containers?: ComputeInstanceContainer[]; + + @doc("Describes informations of dataDisks on this ComputeInstance.") + @visibility("read") + dataDisks?: ComputeInstanceDataDisk[]; + + @doc("Describes informations of dataMounts on this ComputeInstance.") + @visibility("read") + dataMounts?: ComputeInstanceDataMount[]; + + @doc("ComputeInstance version.") + @visibility("read") + versions?: ComputeInstanceVersion; +} + +@doc("Specifies settings for autologger.") +model ComputeInstanceAutologgerSettings { + @doc("Indicates whether mlflow autologger is enabled for notebooks.") + mlflowAutologger?: MlflowAutologger; +} + +@doc("Specifies policy and settings for SSH access.") +model ComputeInstanceSshSettings { + @doc("State of the public SSH port. Possible values are: Disabled - Indicates that the public ssh port is closed on this instance. Enabled - Indicates that the public ssh port is open and accessible according to the VNet/subnet policy if applicable.") + sshPublicAccess?: SshPublicAccess; + + @doc("Describes the admin user name.") + @visibility("read") + adminUserName?: string; + + @doc("Describes the port for connecting through SSH.") + @visibility("read") + sshPort?: int32; + + @doc("Specifies the SSH rsa public key file as a string. Use \"ssh-keygen -t rsa -b 2048\" to generate your SSH key pairs.") + adminPublicKey?: string; +} + +@doc("Returns metadata about the operating system image for this compute instance.") +model ImageMetadata { + @doc("Specifies the current operating system image version this compute instance is running on.") + currentImageVersion?: string; + + @doc("Specifies the latest available operating system image version.") + latestImageVersion?: string; + + @doc("Specifies whether this compute instance is running on the latest operating system image.") + isLatestOsImageVersion?: boolean; +} + +@doc("Defines all connectivity endpoints and properties for an ComputeInstance.") +model ComputeInstanceConnectivityEndpoints { + @doc("Public IP Address of this ComputeInstance.") + @visibility("read") + publicIpAddress?: string; + + @doc("Private IP Address of this ComputeInstance (local to the VNET in which the compute instance is deployed).") + @visibility("read") + privateIpAddress?: string; +} + +@doc("Defines an Aml Instance application and its connectivity endpoint URI.") +model ComputeInstanceApplication { + @doc("Name of the ComputeInstance application.") + displayName?: string; + + @doc("Application' endpoint URI.") + endpointUri?: string; +} + +@doc("Describes information on user who created this ComputeInstance.") +model ComputeInstanceCreatedBy { + @doc("Name of the user.") + @visibility("read") + userName?: string; + + @doc("Uniquely identifies user' Azure Active Directory organization.") + @visibility("read") + userOrgId?: string; + + @doc("Uniquely identifies the user within his/her organization.") + @visibility("read") + userId?: string; +} + +@doc("Settings for a personal compute instance.") +model PersonalComputeInstanceSettings { + @doc("A user explicitly assigned to a personal compute instance.") + assignedUser?: AssignedUser; +} + +@doc("A user that can be assigned to a compute instance.") +model AssignedUser { + @doc("User’s AAD Object Id.") + objectId: string; + + @doc("User’s AAD Tenant Id.") + tenantId: string; +} + +@doc("Details of customized scripts to execute for setting up the cluster.") +model SetupScripts { + @doc("Customized setup scripts") + scripts?: ScriptsToExecute; +} + +@doc("Customized setup scripts") +model ScriptsToExecute { + @doc("Script that's run every time the machine starts.") + startupScript?: ScriptReference; + + @doc("Script that's run only once during provision of the compute.") + creationScript?: ScriptReference; +} + +@doc("Script reference") +model ScriptReference { + @doc("The storage source of the script: inline, workspace.") + scriptSource?: string; + + @doc("The location of scripts in the mounted volume.") + scriptData?: string; + + @doc("Optional command line arguments passed to the script to run.") + scriptArguments?: string; + + @doc("Optional time period passed to timeout command.") + timeout?: string; +} + +@doc("The last operation on ComputeInstance.") +model ComputeInstanceLastOperation { + @doc("Name of the last operation.") + operationName?: OperationName; + + @doc("Time of the last operation.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + operationTime?: utcDateTime; + + @doc("Operation status.") + operationStatus?: OperationStatus; + + @doc("Trigger of operation.") + operationTrigger?: OperationTrigger; +} + +@doc("The list of schedules to be applied on the computes") +model ComputeSchedules { + @doc("The list of compute start stop schedules to be applied.") + computeStartStop?: ComputeStartStopSchedule[]; +} + +@doc("Compute start stop schedule properties") +model ComputeStartStopSchedule { + @doc("A system assigned id for the schedule.") + @visibility("read") + id?: string; + + @doc("The current deployment state of schedule.") + @visibility("read") + provisioningStatus?: ProvisioningStatus; + + @doc("Is the schedule enabled or disabled?") + status?: ScheduleStatus; + + @doc("[Required] The compute power action.") + action?: ComputePowerAction; + + @doc("[Required] The schedule trigger type.") + triggerType?: TriggerType; + + @doc("Required if triggerType is Recurrence.") + recurrence?: Recurrence; + + @doc("Required if triggerType is Cron.") + cron?: Cron; + + @doc("[Deprecated] Not used any more.") + schedule?: ScheduleBase; +} + +@doc("The workflow trigger recurrence for ComputeStartStop schedule type.") +model Recurrence { + @doc("[Required] The frequency to trigger schedule.") + frequency?: RecurrenceFrequency; + + @doc("[Required] Specifies schedule interval in conjunction with frequency") + interval?: int32; + + @doc("The start time in yyyy-MM-ddTHH:mm:ss format.") + startTime?: string; + + @doc(""" +Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +""") + timeZone?: string; + + @doc("[Required] The recurrence schedule.") + schedule?: RecurrenceSchedule; +} + +@doc("The workflow trigger cron for ComputeStartStop schedule type.") +model Cron { + @doc("The start time in yyyy-MM-ddTHH:mm:ss format.") + startTime?: string; + + @doc(""" +Specifies time zone in which the schedule runs. +TimeZone should follow Windows time zone format. Refer: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-time-zones?view=windows-11 +""") + timeZone?: string; + + @doc(""" +[Required] Specifies cron expression of schedule. +The expression should follow NCronTab format. +""") + expression?: string; +} + +model ScheduleBase { + @doc("A system assigned id for the schedule.") + id?: string; + + @doc("The current deployment state of schedule.") + provisioningStatus?: ScheduleProvisioningState; + + @doc("Is the schedule enabled or disabled?") + status?: ScheduleStatus; +} + +@doc("Defines an Aml Instance container.") +model ComputeInstanceContainer { + @doc("Name of the ComputeInstance container.") + name?: string; + + @doc("Auto save settings.") + autosave?: Autosave; + + @doc("Information of GPU.") + gpu?: string; + + @doc("network of this container.") + network?: Network; + + @doc("Environment information of this container.") + environment?: ComputeInstanceEnvironmentInfo; + + @doc("services of this containers.") + @visibility("read") + services?: Record[]; +} + +@doc("Environment information") +model ComputeInstanceEnvironmentInfo { + @doc("name of environment.") + name?: string; + + @doc("version of environment.") + version?: string; +} + +@doc("Defines an Aml Instance DataDisk.") +model ComputeInstanceDataDisk { + @doc("Caching type of Data Disk.") + caching?: Caching; + + @doc("The initial disk size in gigabytes.") + diskSizeGB?: int32; + + @doc("The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.") + lun?: int32; + + @doc("type of this storage account.") + storageAccountType?: StorageAccountType; +} + +@doc("Defines an Aml Instance DataMount.") +model ComputeInstanceDataMount { + @doc("Source of the ComputeInstance data mount.") + source?: string; + + @doc("Data source type.") + sourceType?: SourceType; + + @doc("name of the ComputeInstance data mount.") + mountName?: string; + + @doc("Mount Action.") + mountAction?: MountAction; + + @doc("who this data mount created by.") + createdBy?: string; + + @doc("Path of this data mount.") + mountPath?: string; + + @doc("Mount state.") + mountState?: MountState; + + @doc("The time when the disk mounted.") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + mountedOn?: utcDateTime; + + @doc("Error of this data mount.") + error?: string; +} + +@doc("Version of computeInstance.") +model ComputeInstanceVersion { + @doc("Runtime of compute instance.") + runtime?: string; +} + +@doc("An Azure Machine Learning compute instance.") +model ComputeInstance extends Compute { + ...ComputeInstanceSchema; + + @doc("The type of compute") + computeType: "ComputeInstance"; +} + +@doc("Properties(top level) of ComputeInstance") +model ComputeInstanceSchema { + @doc("Properties of ComputeInstance") + properties?: ComputeInstanceProperties; +} + +@doc("A Machine Learning compute based on Azure Virtual Machines.") +model VirtualMachine extends Compute { + ...VirtualMachineSchema; + + @doc("The type of compute") + computeType: "VirtualMachine"; +} + +model VirtualMachineSchema { + properties?: VirtualMachineSchemaProperties; +} + +model VirtualMachineSchemaProperties { + @doc("Virtual Machine size") + virtualMachineSize?: string; + + @doc("Port open for ssh connections.") + sshPort?: int32; + + @doc("Notebook server port open for ssh connections.") + notebookServerPort?: int32; + + @doc("Public IP address of the virtual machine.") + address?: string; + + @doc("Admin credentials for virtual machine") + administratorAccount?: VirtualMachineSshCredentials; + + @doc("Indicates whether this compute will be used for running notebooks.") + isNotebookInstanceCompute?: boolean; +} + +@doc("Admin credentials for virtual machine") +model VirtualMachineSshCredentials { + @doc("Username of admin account") + username?: string; + + @doc("Password of admin account") + password?: string; + + @doc("Public key data") + publicKeyData?: string; + + @doc("Private key data") + privateKeyData?: string; +} + +@doc("HDInsight compute properties") +model HDInsightProperties { + @doc("Port open for ssh connections on the master node of the cluster.") + sshPort?: int32; + + @doc("Public IP address of the master node of the cluster.") + address?: string; + + @doc("Admin credentials for master node of the cluster") + administratorAccount?: VirtualMachineSshCredentials; +} + +@doc("A HDInsight compute.") +model HDInsight extends Compute { + ...HDInsightSchema; + + @doc("The type of compute") + computeType: "HDInsight"; +} + +model HDInsightSchema { + @doc("HDInsight compute properties") + properties?: HDInsightProperties; +} + +@doc("A DataFactory compute.") +model DataFactory extends Compute { + @doc("The type of compute") + computeType: "DataFactory"; +} + +@doc("Properties of Databricks") +model DatabricksProperties { + @doc("Databricks access token") + databricksAccessToken?: string; + + @doc("Workspace Url") + workspaceUrl?: string; +} + +@doc("A DataFactory compute.") +model Databricks extends Compute { + ...DatabricksSchema; + + @doc("The type of compute") + computeType: "Databricks"; +} + +model DatabricksSchema { + @doc("Properties of Databricks") + properties?: DatabricksProperties; +} + +@doc("A DataLakeAnalytics compute.") +model DataLakeAnalytics extends Compute { + ...DataLakeAnalyticsSchema; + + @doc("The type of compute") + computeType: "DataLakeAnalytics"; +} + +model DataLakeAnalyticsSchema { + properties?: DataLakeAnalyticsSchemaProperties; +} + +model DataLakeAnalyticsSchemaProperties { + @doc("DataLake Store Account Name") + dataLakeStoreAccountName?: string; +} + +@doc("A SynapseSpark compute.") +model SynapseSpark extends Compute { + properties?: SynapseSparkProperties; + + @doc("The type of compute") + computeType: "SynapseSpark"; +} + +model SynapseSparkProperties { + @doc("Auto scale properties.") + autoScaleProperties?: AutoScaleProperties; + + @doc("Auto pause properties.") + autoPauseProperties?: AutoPauseProperties; + + @doc("Spark version.") + sparkVersion?: string; + + @doc("The number of compute nodes currently assigned to the compute.") + nodeCount?: int32; + + @doc("Node size.") + nodeSize?: string; + + @doc("Node size family.") + nodeSizeFamily?: string; + + @doc("Azure subscription identifier.") + subscriptionId?: string; + + @doc("Name of the resource group in which workspace is located.") + resourceGroup?: string; + + @doc("Name of Azure Machine Learning workspace.") + workspaceName?: string; + + @doc("Pool name.") + poolName?: string; +} + +@doc("Auto scale properties") +model AutoScaleProperties { + minNodeCount?: int32; + enabled?: boolean; + maxNodeCount?: int32; +} + +@doc("Auto pause properties") +model AutoPauseProperties { + delayInMinutes?: int32; + enabled?: boolean; +} + +@doc("Properties of AksComputeSecrets") +model AksComputeSecretsProperties { + @doc("Content of kubeconfig file that can be used to connect to the Kubernetes cluster.") + userKubeConfig?: string; + + @doc("Content of kubeconfig file that can be used to connect to the Kubernetes cluster.") + adminKubeConfig?: string; + + @doc("Image registry pull secret.") + imagePullSecretName?: string; +} + +@doc("Secrets related to a Machine Learning compute based on AKS.") +model AksComputeSecrets extends ComputeSecrets { + ...AksComputeSecretsProperties; + + @doc("The type of compute") + computeType: "AKS"; +} + +@doc("Secrets related to a Machine Learning compute based on AKS.") +model VirtualMachineSecrets extends ComputeSecrets { + ...VirtualMachineSecretsSchema; + + @doc("The type of compute") + computeType: "VirtualMachine"; +} + +model VirtualMachineSecretsSchema { + @doc("Admin credentials for virtual machine.") + administratorAccount?: VirtualMachineSshCredentials; +} + +@doc("Properties of Databricks Compute Secrets") +model DatabricksComputeSecretsProperties { + @doc("access token for databricks account.") + databricksAccessToken?: string; +} + +@doc("Secrets related to a Machine Learning compute based on Databricks.") +model DatabricksComputeSecrets extends ComputeSecrets { + ...DatabricksComputeSecretsProperties; + + @doc("The type of compute") + computeType: "Databricks"; +} + +@doc("Account key datastore credentials configuration.") +model AccountKeyDatastoreCredentials extends DatastoreCredentials { + @doc("[Required] Storage account secrets.") + @visibility("create", "update") + secrets: AccountKeyDatastoreSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "AccountKey"; +} + +@doc("Datastore account key secrets.") +model AccountKeyDatastoreSecrets extends DatastoreSecrets { + @doc("Storage account key.") + key?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "AccountKey"; +} + +model AllFeatures extends MonitoringFeatureFilterBase { + @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") + filterType: "AllFeatures"; +} + +@discriminator("filterType") +model MonitoringFeatureFilterBase {} + +@doc("All nodes means the service will be running on all of the nodes of the job") +model AllNodes extends Nodes { + @doc("[Required] Type of the Nodes value") + nodesValueType: "All"; +} + +@doc("AML Token identity configuration.") +model AmlToken extends IdentityConfiguration { + @doc("[Required] Specifies the type of identity framework.") + identityType: "AMLToken"; +} + +@doc("AML token compute identity definition.") +model AmlTokenComputeIdentity extends MonitorComputeIdentityBase { + @doc("[Required] Monitor compute identity type enum.") + computeIdentityType: "AmlToken"; +} + +@doc("Monitor compute identity base definition.") +@discriminator("computeIdentityType") +model MonitorComputeIdentityBase {} + +@doc("Asset input type.") +model AssetJobInput { + @doc("Input Asset Delivery Mode.") + @visibility("read", "create") + mode?: InputDeliveryMode; + + @doc("[Required] Input Asset URI.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + uri: string; +} + +@doc("Asset output type.") +model AssetJobOutput { + @doc("Output Asset Name.") + assetName?: string; + + @doc("Output Asset Version.") + assetVersion?: string; + + @doc("Auto delete setting of output data asset.") + @visibility("read", "create", "update") + autoDeleteSetting?: AutoDeleteSetting; + + @doc("Output Asset Delivery Mode.") + @visibility("read", "create") + mode?: OutputDeliveryMode; + + @doc("Output Asset URI.") + uri?: string; +} + +@doc("Forecast horizon determined automatically by system.") +model AutoForecastHorizon extends ForecastHorizon { + @doc("[Required] Set forecast horizon value selection mode.") + mode: "Auto"; +} + +@doc("The desired maximum forecast horizon in units of time-series frequency.") +@discriminator("mode") +model ForecastHorizon {} + +@doc(""" +AutoMLJob class. +Use this class for executing AutoML tasks like Classification/Regression etc. +See TaskType enum for all the tasks supported. +""") +model AutoMLJob extends JobBase { + @doc(""" +The ARM resource ID of the Environment specification for the job. +This is optional value to provide, if not provided, AutoML will default this to Production AutoML curated environment version when running the job. +""") + @visibility("read", "create") + environmentId?: string; + + @doc("Environment variables included in the job.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: JobResourceConfiguration; + + @doc("[Required] This represents scenario which can be one of Tables/NLP/Image") + taskDetails: AutoMLVertical; + + @doc("[Required] Specifies the type of job.") + jobType: "AutoML"; +} + +@doc("Job output definition container information on where to find job output/logs.") +@discriminator("jobOutputType") +model JobOutput { + @doc("Description for the output.") + @visibility("read", "create") + description?: string; +} + +model QueueSettings { + @doc("Controls the compute job tier") + @visibility("read", "create") + jobTier?: JobTier; + + @doc("Controls the priority of the job on a compute.") + @visibility("read", "create") + priority?: int32; +} + +model JobResourceConfiguration extends ResourceConfiguration { + @doc("Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types.") + @visibility("read", "create") + dockerArgs?: string; + + @doc("Size of the docker container's shared memory block. This should be in the format of (number)(unit) where number as to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes).") + @visibility("read", "create") + @pattern("\\d+[bBkKmMgG]") + shmSize?: string; +} + +@doc(""" +AutoML vertical class. +Base class for AutoML verticals - TableVertical/ImageVertical/NLPVertical +""") +@discriminator("taskType") +model AutoMLVertical { + @doc("Log verbosity for the job.") + logVerbosity?: LogVerbosity; + + @doc(""" +Target column name: This is prediction values column. +Also known as label column name in context of classification tasks. +""") + targetColumnName?: string; + + @doc("[Required] Training data input.") + trainingData: MLTableJobInput; +} + +model MLTableJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "mltable"; +} + +@doc("Command job definition.") +@discriminator("jobInputType") +model JobInput { + @doc("Description for the input.") + @visibility("read", "create") + description?: string; +} + +@doc("N-Cross validations determined automatically.") +model AutoNCrossValidations extends NCrossValidations { + @doc("[Required] Mode for determining N-Cross validations.") + mode: "Auto"; +} + +@doc("N-Cross validations value.") +@discriminator("mode") +model NCrossValidations {} + +model AutoSeasonality extends Seasonality { + @doc("[Required] Seasonality mode.") + mode: "Auto"; +} + +@doc("Forecasting seasonality.") +@discriminator("mode") +model Seasonality {} + +model AutoTargetLags extends TargetLags { + @doc("[Required] Set target lags mode - Auto/Custom") + mode: "Auto"; +} + +@doc("The number of past periods to lag from the target column.") +@discriminator("mode") +model TargetLags {} + +@doc("Target lags rolling window determined automatically.") +model AutoTargetRollingWindowSize extends TargetRollingWindowSize { + @doc("[Required] TargetRollingWindowSiz detection mode.") + mode: "Auto"; +} + +@doc("Forecasting target rolling window size.") +@discriminator("mode") +model TargetRollingWindowSize {} + +@doc("Settings for Autologger.") +model AutologgerSettings { + @doc("[Required] Indicates whether mlflow autologger is enabled.") + @visibility("read", "create") + mlflowAutologger: MLFlowAutologgerState; +} + +model AzMonMonitoringAlertNotificationSettings + extends MonitoringAlertNotificationSettingsBase { + @doc("[Required] Specifies the type of signal to monitor.") + alertNotificationType: "AzureMonitor"; +} + +@discriminator("alertNotificationType") +model MonitoringAlertNotificationSettingsBase {} + +@doc("Azure Blob datastore configuration.") +model AzureBlobDatastore extends Datastore { + ...AzureDatastore; + + @doc("Storage account name.") + @visibility("read", "create") + accountName?: string; + + @doc("Storage account container name.") + @visibility("read", "create") + containerName?: string; + + @doc("Azure cloud endpoint for the storage account.") + @visibility("read", "create") + endpoint?: string; + + @doc("Protocol used to communicate with the storage account.") + @visibility("read", "create") + protocol?: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureBlob"; +} + +@doc("Base definition for Azure datastore contents configuration.") +model AzureDatastore { + @doc("Azure Resource Group name") + resourceGroup?: string; + + @doc("Azure Subscription Id") + subscriptionId?: string; +} + +@doc("Azure Data Lake Gen1 datastore configuration.") +model AzureDataLakeGen1Datastore extends Datastore { + ...AzureDatastore; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Azure Data Lake store name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + storeName: string; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureDataLakeGen1"; +} + +@doc("Azure Data Lake Gen2 datastore configuration.") +model AzureDataLakeGen2Datastore extends Datastore { + ...AzureDatastore; + + @doc("[Required] Storage account name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + accountName: string; + + @doc("Azure cloud endpoint for the storage account.") + @visibility("read", "create") + endpoint?: string; + + @doc("[Required] The name of the Data Lake Gen2 filesystem.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + filesystem: string; + + @doc("Protocol used to communicate with the storage account.") + @visibility("read", "create") + protocol?: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureDataLakeGen2"; +} + +@doc("Webhook details specific for Azure DevOps") +model AzureDevOpsWebhook extends Webhook { + @doc("[Required] Specifies the type of service to send a callback") + webhookType: "AzureDevOps"; +} + +@doc("Azure File datastore configuration.") +model AzureFileDatastore extends Datastore { + ...AzureDatastore; + + @doc("[Required] Storage account name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + accountName: string; + + @doc("Azure cloud endpoint for the storage account.") + @visibility("read", "create") + endpoint?: string; + + @doc("[Required] The name of the Azure file share that the datastore points to.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + fileShareName: string; + + @doc("Protocol used to communicate with the storage account.") + @visibility("read", "create") + protocol?: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "AzureFile"; +} + +@doc("Azure ML batch inferencing server configurations.") +model AzureMLBatchInferencingServer extends InferencingServer { + @doc("Code configuration for AML batch inferencing server.") + codeConfiguration?: CodeConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "AzureMLBatch"; +} + +@doc("Azure ML online inferencing configurations.") +model AzureMLOnlineInferencingServer extends InferencingServer { + @doc("Code configuration for AML inferencing server.") + codeConfiguration?: CodeConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "AzureMLOnline"; +} + +@doc("Defines an early termination policy based on slack criteria, and a frequency and delay interval for evaluation") +model BanditPolicy extends EarlyTerminationPolicy { + @doc("Absolute distance allowed from the best performing run.") + slackAmount?: float32; + + @doc("Ratio of the allowed distance from the best performing run.") + slackFactor?: float32; + + @doc("[Required] Name of policy configuration") + policyType: "Bandit"; +} + +@doc("Early termination policies enable canceling poor-performing runs before they complete") +@discriminator("policyType") +model EarlyTerminationPolicy { + @doc("Number of intervals by which to delay the first evaluation.") + delayEvaluation?: int32; + + @doc("Interval (number of runs) between policy evaluations.") + evaluationInterval?: int32; +} + +@doc("Base environment type.") +model BaseEnvironmentId extends BaseEnvironmentSource { + @doc("[Required] Resource id accepting ArmId or AzureMlId.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + resourceId: string; + + @doc("[Required] Base environment type.") + baseEnvironmentSourceType: "EnvironmentAsset"; +} + +@doc("Properties for a Batch Pipeline Component Deployment.") +model BatchPipelineComponentDeploymentConfiguration + extends BatchDeploymentConfiguration { + @doc("The ARM id of the component to be run.") + componentId?: IdAssetReference; + + @doc("The description which will be applied to the job.") + description?: string; + + @doc("Run-time settings for the pipeline job.") + settings?: Record; + + @doc("The tags which will be applied to the job.") + tags?: Record; + + @doc("[Required] The type of the deployment") + deploymentConfigurationType: "PipelineComponent"; +} + +@doc("Reference to an asset via its ARM resource ID.") +model IdAssetReference extends AssetReferenceBase { + @doc("[Required] ARM resource ID of the asset.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + assetId: string; + + @doc("[Required] Specifies the type of asset reference.") + referenceType: "Id"; +} + +@doc("Defines a Sampling Algorithm that generates values based on previous values") +model BayesianSamplingAlgorithm extends SamplingAlgorithm { + @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") + samplingAlgorithmType: "Bayesian"; +} + +@doc(""" +The Sampling Algorithm used to generate hyperparameter values, along with properties to +configure the algorithm +""") +@discriminator("samplingAlgorithmType") +model SamplingAlgorithm {} + +model CategoricalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { + @doc("[Required] The categorical data drift metric to calculate.") + @visibility("read", "create") + metric: CategoricalDataDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Categorical"; +} + +@discriminator("dataType") +model DataDriftMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model MonitoringThreshold { + @doc("The threshold value. If null, the set default is dependent on the metric type.") + @visibility("read", "create") + value?: float32; +} + +model CategoricalDataQualityMetricThreshold + extends DataQualityMetricThresholdBase { + @doc("[Required] The categorical data quality metric to calculate.") + @visibility("read", "create") + metric: CategoricalDataQualityMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Categorical"; +} + +@discriminator("dataType") +model DataQualityMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model CategoricalPredictionDriftMetricThreshold + extends PredictionDriftMetricThresholdBase { + @doc("[Required] The categorical prediction drift metric to calculate.") + @visibility("read", "create") + metric: CategoricalPredictionDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Categorical"; +} + +@discriminator("dataType") +model PredictionDriftMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +@doc("Certificate datastore credentials configuration.") +model CertificateDatastoreCredentials extends DatastoreCredentials { + @doc("Authority URL used for authentication.") + authorityUrl?: string; + + @doc("[Required] Service principal client ID.") + clientId: string; + + @doc("Resource the service principal has access to.") + resourceUrl?: string; + + @doc("[Required] Service principal secrets.") + @visibility("create", "update") + secrets: CertificateDatastoreSecrets; + + @doc("[Required] ID of the tenant to which the service principal belongs.") + tenantId: string; + + @doc("[Required] Thumbprint of the certificate used for authentication.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + thumbprint: string; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "Certificate"; +} + +@doc("Datastore certificate secrets.") +model CertificateDatastoreSecrets extends DatastoreSecrets { + @doc("Service principal certificate.") + certificate?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "Certificate"; +} + +@doc("Classification task in AutoML Table vertical.") +model Classification extends AutoMLVertical { + ...TableVertical; + + @doc("Positive label for binary metrics calculation.") + positiveLabel?: string; + + @doc("Primary metric for the task.") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("Inputs for training phase for an AutoML Job.") + trainingSettings?: ClassificationTrainingSettings; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "Classification"; +} + +@doc("Classification Training related configuration.") +model ClassificationTrainingSettings extends TrainingSettings { + @doc("Allowed models for classification task.") + allowedTrainingAlgorithms?: ClassificationModels[]; + + @doc("Blocked models for classification task.") + blockedTrainingAlgorithms?: ClassificationModels[]; +} + +@doc("Training related configuration.") +model TrainingSettings { + @doc("Enable recommendation of DNN models.") + enableDnnTraining?: boolean; + + @doc("Flag to turn on explainability on best model.") + enableModelExplainability?: boolean; + + @doc("Flag for enabling onnx compatible models.") + enableOnnxCompatibleModels?: boolean; + + @doc("Enable stack ensemble run.") + enableStackEnsemble?: boolean; + + @doc("Enable voting ensemble run.") + enableVoteEnsemble?: boolean; + + @doc(""" +During VotingEnsemble and StackEnsemble model generation, multiple fitted models from the previous child runs are downloaded. +Configure this parameter with a higher value than 300 secs, if more time is needed. +""") + ensembleModelDownloadTimeout?: duration; + + @doc("Stack ensemble settings for stack ensemble run.") + stackEnsembleSettings?: StackEnsembleSettings; + + @doc(""" +TrainingMode mode - Setting to 'auto' is same as setting it to 'non-distributed' for now, however in the future may result in mixed mode or heuristics based mode selection. Default is 'auto'. +If 'Distributed' then only distributed featurization is used and distributed algorithms are chosen. +If 'NonDistributed' then only non distributed algorithms are chosen. +""") + trainingMode?: TrainingMode; +} + +@doc("Advances setting to customize StackEnsemble run.") +model StackEnsembleSettings { + @doc("Optional parameters to pass to the initializer of the meta-learner.") + stackMetaLearnerKWargs?: Record; + + @doc("Specifies the proportion of the training set (when choosing train and validation type of training) to be reserved for training the meta-learner. Default value is 0.2.") + stackMetaLearnerTrainPercentage?: float32; + + @doc("The meta-learner is a model trained on the output of the individual heterogeneous models.") + stackMetaLearnerType?: StackMetaLearnerType; +} + +@doc("Abstract class for AutoML tasks that use table dataset as input - such as Classification/Regression/Forecasting.") +model TableVertical { + @doc("Columns to use for CVSplit data.") + cvSplitColumnNames?: string[]; + + @doc("Featurization inputs needed for AutoML job.") + featurizationSettings?: TableVerticalFeaturizationSettings; + + @doc("Model/training parameters that will remain constant throughout training.") + fixedParameters?: TableFixedParameters; + + @doc("Execution constraints for AutoMLJob.") + limitSettings?: TableVerticalLimitSettings; + + @doc(""" +Number of cross validation folds to be applied on training dataset +when validation dataset is not provided. +""") + nCrossValidations?: NCrossValidations; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: TableParameterSubspace[]; + + @doc("Settings for model sweeping and hyperparameter tuning.") + sweepSettings?: TableSweepSettings; + + @doc("Test data input.") + testData?: MLTableJobInput; + + @doc(""" +The fraction of test dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +""") + testDataSize?: float32; + + @doc("Validation data inputs.") + validationData?: MLTableJobInput; + + @doc(""" +The fraction of training dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +""") + validationDataSize?: float32; + + @doc("The name of the sample weight column. Automated ML supports a weighted column as an input, causing rows in the data to be weighted up or down.") + weightColumnName?: string; +} + +@doc("Featurization Configuration.") +model TableVerticalFeaturizationSettings extends FeaturizationSettings { + @doc("These transformers shall not be used in featurization.") + blockedTransformers?: BlockedTransformers[]; + + @doc("Dictionary of column name and its type (int, float, string, datetime etc).") + columnNameAndTypes?: Record; + + @doc("Determines whether to use Dnn based featurizers for data featurization.") + enableDnnFeaturization?: boolean; + + @doc(""" +Featurization mode - User can keep the default 'Auto' mode and AutoML will take care of necessary transformation of the data in featurization phase. +If 'Off' is selected then no featurization is done. +If 'Custom' is selected then user can specify additional inputs to customize how featurization is done. +""") + mode?: FeaturizationMode; + + @doc("User can specify additional transformers to be used along with the columns to which it would be applied and parameters for the transformer constructor.") + transformerParams?: Record; +} + +@doc("Column transformer parameters.") +model ColumnTransformer { + @doc("Fields to apply transformer logic on.") + fields?: string[]; + + @doc(""" +Different properties to be passed to transformer. +Input expected is dictionary of key,value pairs in JSON format. +""") + parameters?: Record; +} + +@doc("Featurization Configuration.") +model FeaturizationSettings { + @doc("Dataset language, useful for the text data.") + datasetLanguage?: string; +} + +@doc("Fixed training parameters that won't be swept over during AutoML Table training.") +model TableFixedParameters { + @doc("Specify the boosting type, e.g gbdt for XGBoost.") + booster?: string; + + @doc("Specify the boosting type, e.g gbdt for LightGBM.") + boostingType?: string; + + @doc("Specify the grow policy, which controls the way new nodes are added to the tree.") + growPolicy?: string; + + @doc("The learning rate for the training procedure.") + learningRate?: float32; + + @doc("Specify the Maximum number of discrete bins to bucket continuous features .") + maxBin?: int32; + + @doc("Specify the max depth to limit the tree depth explicitly.") + maxDepth?: int32; + + @doc("Specify the max leaves to limit the tree leaves explicitly.") + maxLeaves?: int32; + + @doc("The minimum number of data per leaf.") + minDataInLeaf?: int32; + + @doc("Minimum loss reduction required to make a further partition on a leaf node of the tree.") + minSplitGain?: float32; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Specify the number of trees (or rounds) in an model.") + nEstimators?: int32; + + @doc("Specify the number of leaves.") + numLeaves?: int32; + + @doc("The name of the preprocessor to use.") + preprocessorName?: string; + + @doc("L1 regularization term on weights.") + regAlpha?: float32; + + @doc("L2 regularization term on weights.") + regLambda?: float32; + + @doc("Subsample ratio of the training instance.") + subsample?: float32; + + @doc("Frequency of subsample.") + subsampleFreq?: float32; + + @doc("Specify the tree method.") + treeMethod?: string; + + @doc("If true, center before scaling the data with StandardScalar.") + withMean?: boolean; + + @doc("If true, scaling the data with Unit Variance with StandardScalar.") + withStd?: boolean; +} + +@doc("Job execution constraints.") +model TableVerticalLimitSettings { + @doc("Enable early termination, determines whether or not if AutoMLJob will terminate early if there is no score improvement in last 20 iterations.") + enableEarlyTermination?: boolean; + + @doc("Exit score for the AutoML job.") + exitScore?: float32; + + @doc("Maximum Concurrent iterations.") + maxConcurrentTrials?: int32; + + @doc("Max cores per iteration.") + maxCoresPerTrial?: int32; + + @doc("Maximum nodes to use for the experiment.") + maxNodes?: int32; + + @doc("Number of iterations.") + maxTrials?: int32; + + @doc("Number of concurrent sweeping runs that user wants to trigger.") + sweepConcurrentTrials?: int32; + + @doc("Number of sweeping runs that user wants to trigger.") + sweepTrials?: int32; + + @doc("AutoML job timeout.") + timeout?: duration; + + @doc("Iteration timeout.") + trialTimeout?: duration; +} + +model TableParameterSubspace { + @doc("Specify the boosting type, e.g gbdt for XGBoost.") + booster?: string; + + @doc("Specify the boosting type, e.g gbdt for LightGBM.") + boostingType?: string; + + @doc("Specify the grow policy, which controls the way new nodes are added to the tree.") + growPolicy?: string; + + @doc("The learning rate for the training procedure.") + learningRate?: string; + + @doc("Specify the Maximum number of discrete bins to bucket continuous features .") + maxBin?: string; + + @doc("Specify the max depth to limit the tree depth explicitly.") + maxDepth?: string; + + @doc("Specify the max leaves to limit the tree leaves explicitly.") + maxLeaves?: string; + + @doc("The minimum number of data per leaf.") + minDataInLeaf?: string; + + @doc("Minimum loss reduction required to make a further partition on a leaf node of the tree.") + minSplitGain?: string; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Specify the number of trees (or rounds) in an model.") + nEstimators?: string; + + @doc("Specify the number of leaves.") + numLeaves?: string; + + @doc("The name of the preprocessor to use.") + preprocessorName?: string; + + @doc("L1 regularization term on weights.") + regAlpha?: string; + + @doc("L2 regularization term on weights.") + regLambda?: string; + + @doc("Subsample ratio of the training instance.") + subsample?: string; + + @doc("Frequency of subsample") + subsampleFreq?: string; + + @doc("Specify the tree method.") + treeMethod?: string; + + @doc("If true, center before scaling the data with StandardScalar.") + withMean?: string; + + @doc("If true, scaling the data with Unit Variance with StandardScalar.") + withStd?: string; +} + +model TableSweepSettings { + @doc("Type of early termination policy for the sweeping job.") + earlyTermination?: EarlyTerminationPolicy; + + @doc("[Required] Type of sampling algorithm.") + samplingAlgorithm: SamplingAlgorithmType; +} + +model ClassificationModelPerformanceMetricThreshold + extends ModelPerformanceMetricThresholdBase { + @doc("[Required] The classification model performance to calculate.") + @visibility("read", "create") + metric: ClassificationModelPerformanceMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + modelType: "Classification"; +} + +@discriminator("modelType") +model ModelPerformanceMetricThresholdBase { + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model CocoExportSummary extends ExportSummary { + @doc("The container name to which the labels will be exported.") + @visibility("read") + containerName?: string; + + @doc("The output path where the labels will be exported.") + @visibility("read") + snapshotPath?: string; + + @doc("[Required] The format of exported labels, also as the discriminator.") + format: "Coco"; +} + +@doc("Command job definition.") +model CommandJob extends JobBase { + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") + @visibility("read", "create") + autologgerSettings?: AutologgerSettings; + + @doc("ARM resource ID of the code asset.") + @visibility("read", "create") + codeId?: string; + + @doc("[Required] The command to execute on startup of the job. eg. \"python train.py\"") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + command: string; + + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, Ray, or null.") + @visibility("read", "create") + distribution?: DistributionConfiguration; + + @doc("[Required] The ARM resource ID of the Environment specification for the job.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + environmentId: string; + + @doc("Environment variables included in the job.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("Mapping of input data bindings used in the job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Command Job limit.") + @visibility("read", "create") + limits?: CommandJobLimits; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Input parameters.") + @visibility("read") + parameters?: Record; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: JobResourceConfiguration; + + @doc("[Required] Specifies the type of job.") + jobType: "Command"; +} + +@doc("Base definition for job distribution configuration.") +@discriminator("distributionType") +model DistributionConfiguration {} + +@doc("Command Job limit class.") +model CommandJobLimits extends JobLimits { + @doc("[Required] JobLimit type.") + jobLimitsType: "Command"; +} + +@discriminator("jobLimitsType") +model JobLimits { + @doc("The max run duration in ISO 8601 format, after which the job will be cancelled. Only supports duration with precision as low as Seconds.") + timeout?: duration; +} + +@doc("Resource requirements for each container instance within an online deployment.") +model ContainerResourceRequirements { + @doc("Container resource limit info:") + containerResourceLimits?: ContainerResourceSettings; + + @doc("Container resource request info:") + containerResourceRequests?: ContainerResourceSettings; +} + +model ContainerResourceSettings { + @doc(""" +Number of vCPUs request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +""") + cpu?: string; + + @doc(""" +Number of Nvidia GPU cards request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +""") + gpu?: string; + + @doc(""" +Memory size request/limit for container. More info: +https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ +""") + memory?: string; +} + +model CreateMonitorAction extends ScheduleActionBase { + @doc("[Required] Defines the monitor.") + @visibility("read", "create") + monitorDefinition: MonitorDefinition; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "CreateMonitor"; +} + +model MonitorDefinition { + @doc("The monitor's notification settings.") + @visibility("read", "create") + alertNotificationSetting?: MonitoringAlertNotificationSettingsBase; + + @doc("[Required] The ARM resource ID of the compute resource to run the monitoring job on.") + @visibility("read", "create") + computeConfiguration: MonitorComputeConfigurationBase; + + @doc("The ARM resource ID of either the model or deployment targeted by this monitor.") + @visibility("read", "create") + monitoringTarget?: MonitoringTarget; + + @doc("[Required] The signals to monitor.") + @visibility("read", "create") + signals: Record; +} + +@doc("Monitor compute configuration base definition.") +@discriminator("computeType") +model MonitorComputeConfigurationBase {} + +@doc("Monitoring target definition.") +model MonitoringTarget { + @doc("The ARM resource ID of either the deployment targeted by this monitor.") + @visibility("read", "create") + deploymentId?: string; + + @doc("The ARM resource ID of either the model targeted by this monitor.") + @visibility("read", "create") + modelId?: string; + + @doc("[Required] The machine learning task type of the model.") + @visibility("read", "create") + taskType: ModelTaskType; +} + +@discriminator("signalType") +model MonitoringSignalBase { + @doc("The current notification mode for this signal.") + @visibility("read", "create") + mode?: MonitoringNotificationMode; + + @doc("Property dictionary. Properties can be added, but not removed or altered.") + properties?: Record; +} + +model CronTrigger extends TriggerBase { + @doc(""" +[Required] Specifies cron expression of schedule. +The expression should follow NCronTab format. +""") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + expression: string; + + @doc("[Required] ") + triggerType: "Cron"; +} + +model CsvExportSummary extends ExportSummary { + @doc("The container name to which the labels will be exported.") + @visibility("read") + containerName?: string; + + @doc("The output path where the labels will be exported.") + @visibility("read") + snapshotPath?: string; + + @doc("[Required] The format of exported labels, also as the discriminator.") + format: "CSV"; +} + +@doc("The desired maximum forecast horizon in units of time-series frequency.") +model CustomForecastHorizon extends ForecastHorizon { + @doc("[Required] Forecast horizon value.") + value: int32; + + @doc("[Required] Set forecast horizon value selection mode.") + mode: "Custom"; +} + +@doc("Custom inference server configurations.") +model CustomInferencingServer extends InferencingServer { + @doc("Inference configuration for custom inferencing.") + inferenceConfiguration?: OnlineInferenceConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "Custom"; +} + +@doc("Online inference configuration options.") +model OnlineInferenceConfiguration { + @doc("Additional configurations") + configurations?: Record; + + @doc("Entry script or command to invoke.") + entryScript?: string; + + @doc("The route to check the liveness of the inference server container.") + livenessRoute?: Route; + + @doc("The route to check the readiness of the inference server container.") + readinessRoute?: Route; + + @doc("The port to send the scoring requests to, within the inference server container.") + scoringRoute?: Route; +} + +model CustomMetricThreshold { + @doc("[Required] The user-defined metric to calculate.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + metric: string; + + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model CustomModelJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "custom_model"; +} + +model CustomModelJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "custom_model"; +} + +model CustomMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] ARM resource ID of the component resource used to calculate the custom metrics.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + componentId: string; + + @doc("Monitoring assets to take as input. Key is the component input port name, value is the data asset.") + @visibility("read", "create") + inputAssets?: Record; + + @doc("Extra component parameters to take as input. Key is the component literal input port name, value is the parameter value.") + @visibility("read", "create") + inputs?: Record; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: CustomMetricThreshold[]; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + workspaceConnection: MonitoringWorkspaceConnection; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "Custom"; +} + +@doc("Monitoring input data base definition.") +@discriminator("inputDataType") +model MonitoringInputDataBase { + @doc("Mapping of column names to special uses.") + @visibility("read", "create") + columns?: Record; + + @doc("The context metadata of the data source.") + @visibility("read", "create") + dataContext?: string; + + @doc("[Required] Specifies the type of job.") + @visibility("read", "create") + jobInputType: JobInputType; + + @doc("[Required] Input Asset URI.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + uri: string; +} + +@doc("Monitoring workspace connection definition.") +model MonitoringWorkspaceConnection { + @doc(""" +The properties of a workspace service connection to store as environment variables in the submitted jobs. +Key is workspace connection property path, name is environment variable key. +""") + @visibility("read", "create") + environmentVariables?: Record; + + @doc(""" +The properties of a workspace service connection to store as secrets in the submitted jobs. +Key is workspace connection property path, name is secret key. +""") + @visibility("read", "create") + secrets?: Record; +} + +@doc("N-Cross validations are specified by user.") +model CustomNCrossValidations extends NCrossValidations { + @doc("[Required] N-Cross validations value.") + value: int32; + + @doc("[Required] Mode for determining N-Cross validations.") + mode: "Custom"; +} + +model CustomSeasonality extends Seasonality { + @doc("[Required] Seasonality value.") + value: int32; + + @doc("[Required] Seasonality mode.") + mode: "Custom"; +} + +model CustomTargetLags extends TargetLags { + @doc("[Required] Set target lags values.") + values: int32[]; + + @doc("[Required] Set target lags mode - Auto/Custom") + mode: "Custom"; +} + +model CustomTargetRollingWindowSize extends TargetRollingWindowSize { + @doc("[Required] TargetRollingWindowSize value.") + value: int32; + + @doc("[Required] TargetRollingWindowSiz detection mode.") + mode: "Custom"; +} + +model DataDriftMonitoringSignal extends MonitoringSignalBase { + @doc("The data segment used for scoping on a subset of the data population.") + @visibility("read", "create") + dataSegment?: MonitoringDataSegment; + + @doc("A dictionary that maps feature names to their respective data types.") + @visibility("read", "create") + featureDataTypeOverride?: Record; + + @doc("The feature filter which identifies which feature to calculate drift over.") + @visibility("read", "create") + features?: MonitoringFeatureFilterBase; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: DataDriftMetricThresholdBase[]; + + @doc("[Required] The data which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "DataDrift"; +} + +model MonitoringDataSegment { + @doc("The feature to segment the data on.") + @visibility("read", "create") + feature?: string; + + @doc("Filters for only the specified values of the given segmented feature.") + @visibility("read", "create") + values?: string[]; +} + +model DataImport extends DataVersionBase { + @doc("Name of the asset for data import job to create") + assetName?: string; + + @doc("Source data of the asset to import from") + source?: DataImportSource; + + @doc("[Required] Specifies the type of data.") + dataType: "uri_folder"; +} + +@discriminator("sourceType") +model DataImportSource { + @doc("Workspace connection for data import source storage") + connection?: string; +} + +@doc("Reference to an asset via its path in a datastore.") +model DataPathAssetReference extends AssetReferenceBase { + @doc("ARM resource ID of the datastore where the asset is located.") + datastoreId?: string; + + @doc("The path of the file/directory in the datastore.") + path?: string; + + @doc("[Required] Specifies the type of asset reference.") + referenceType: "DataPath"; +} + +model DataQualityMonitoringSignal extends MonitoringSignalBase { + @doc("A dictionary that maps feature names to their respective data types.") + @visibility("read", "create") + featureDataTypeOverride?: Record; + + @doc("The features to calculate drift over.") + @visibility("read", "create") + features?: MonitoringFeatureFilterBase; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: DataQualityMetricThresholdBase[]; + + @doc("[Required] The data produced by the production service which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "DataQuality"; +} + +model DatabaseSource extends DataImportSource { + @doc("SQL Query statement for data import Database source") + query?: string; + + @doc("SQL StoredProcedure on data import Database source") + storedProcedure?: string; + + @doc("SQL StoredProcedure parameters") + storedProcedureParams?: Record[]; + + @doc("Name of the table on data import Database source") + tableName?: string; + + @doc("[Required] Specifies the type of data.") + sourceType: "database"; +} + +model DatasetExportSummary extends ExportSummary { + @doc("The unique name of the labeled data asset.") + @visibility("read") + labeledAssetName?: string; + + @doc("[Required] The format of exported labels, also as the discriminator.") + format: "Dataset"; +} + +model DefaultScaleSettings extends OnlineScaleSettings { + @doc("[Required] Type of deployment scaling algorithm") + scaleType: "Default"; +} + +model EmailMonitoringAlertNotificationSettings + extends MonitoringAlertNotificationSettingsBase { + @doc("Configuration for notification.") + @visibility("read", "create") + emailNotificationSetting?: NotificationSetting; + + @doc("[Required] Specifies the type of signal to monitor.") + alertNotificationType: "Email"; +} + +model EndpointScheduleAction extends ScheduleActionBase { + @doc(""" +[Required] Defines Schedule action definition details. + +""") + @visibility("read", "create", "update") + endpointInvocationDefinition: Record; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "InvokeBatchEndpoint"; +} + +model FeatureAttributionDriftMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThreshold: FeatureAttributionMetricThreshold; + + @doc("[Required] The data which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase[]; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "FeatureAttributionDrift"; +} + +model FeatureAttributionMetricThreshold { + @doc("[Required] The feature attribution metric to calculate.") + @visibility("read", "create") + metric: FeatureAttributionMetric; + + @doc("The threshold value. If null, a default value will be set depending on the selected metric.") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +model FeatureSubset extends MonitoringFeatureFilterBase { + @doc("[Required] The list of features to include.") + @visibility("read", "create") + features: string[]; + + @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") + filterType: "FeatureSubset"; +} + +model FileSystemSource extends DataImportSource { + @doc("Path on data import FileSystem source") + path?: string; + + @doc("[Required] Specifies the type of data.") + sourceType: "file_system"; +} + +@doc("Fixed input data definition.") +model FixedInputData extends MonitoringInputDataBase { + @doc("[Required] Specifies the type of signal to monitor.") + inputDataType: "Fixed"; +} + +@doc("Forecasting task in AutoML Table vertical.") +model Forecasting extends AutoMLVertical { + ...TableVertical; + + @doc("Forecasting task specific inputs.") + forecastingSettings?: ForecastingSettings; + + @doc("Primary metric for forecasting task.") + primaryMetric?: ForecastingPrimaryMetrics; + + @doc("Inputs for training phase for an AutoML Job.") + trainingSettings?: ForecastingTrainingSettings; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "Forecasting"; +} + +@doc("Forecasting specific parameters.") +model ForecastingSettings { + @doc(""" +Country or region for holidays for forecasting tasks. +These should be ISO 3166 two-letter country/region codes, for example 'US' or 'GB'. +""") + countryOrRegionForHolidays?: string; + + @doc(""" +Number of periods between the origin time of one CV fold and the next fold. For +example, if `CVStepSize` = 3 for daily data, the origin time for each fold will be +three days apart. +""") + cvStepSize?: int32; + + @doc("Flag for generating lags for the numeric features with 'auto' or null.") + featureLags?: FeatureLags; + + @doc(""" +The feature columns that are available for training but unknown at the time of forecast/inference. +If features_unknown_at_forecast_time is not set, it is assumed that all the feature columns in the dataset are known at inference time. +""") + featuresUnknownAtForecastTime?: string[]; + + @doc("The desired maximum forecast horizon in units of time-series frequency.") + forecastHorizon?: ForecastHorizon; + + @doc("When forecasting, this parameter represents the period with which the forecast is desired, for example daily, weekly, yearly, etc. The forecast frequency is dataset frequency by default.") + frequency?: string; + + @doc(""" +Set time series seasonality as an integer multiple of the series frequency. +If seasonality is set to 'auto', it will be inferred. +""") + seasonality?: Seasonality; + + @doc("The parameter defining how if AutoML should handle short time series.") + shortSeriesHandlingConfig?: ShortSeriesHandlingConfiguration; + + @doc(""" +The function to be used to aggregate the time series target column to conform to a user specified frequency. +If the TargetAggregateFunction is set i.e. not 'None', but the freq parameter is not set, the error is raised. The possible target aggregation functions are: \"sum\", \"max\", \"min\" and \"mean\". +""") + targetAggregateFunction?: TargetAggregationFunction; + + @doc("The number of past periods to lag from the target column.") + targetLags?: TargetLags; + + @doc("The number of past periods used to create a rolling window average of the target column.") + targetRollingWindowSize?: TargetRollingWindowSize; + + @doc("The name of the time column. This parameter is required when forecasting to specify the datetime column in the input data used for building the time series and inferring its frequency.") + timeColumnName?: string; + + @doc(""" +The names of columns used to group a timeseries. It can be used to create multiple series. +If grain is not defined, the data set is assumed to be one time-series. This parameter is used with task type forecasting. +""") + timeSeriesIdColumnNames?: string[]; + + @doc("Configure STL Decomposition of the time-series target column.") + useStl?: UseStl; +} + +@doc("Forecasting Training related configuration.") +model ForecastingTrainingSettings extends TrainingSettings { + @doc("Allowed models for forecasting task.") + allowedTrainingAlgorithms?: ForecastingModels[]; + + @doc("Blocked models for forecasting task.") + blockedTrainingAlgorithms?: ForecastingModels[]; +} + +@doc("Generation safety quality metric threshold definition.") +model GenerationSafetyQualityMetricThreshold { + @doc("[Required] Gets or sets the feature attribution metric to calculate.") + @visibility("read", "create") + metric: GenerationSafetyQualityMetric; + + @doc(""" +Gets or sets the threshold value. +If null, a default value will be set depending on the selected metric. +""") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +@doc("Generation safety quality monitoring signal definition.") +model GenerationSafetyQualityMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] Gets or sets the metrics to calculate and the corresponding thresholds.") + @visibility("read", "create") + metricThresholds: GenerationSafetyQualityMetricThreshold[]; + + @doc("Gets or sets the target data for computing metrics.") + @visibility("read", "create") + productionData?: MonitoringInputDataBase[]; + + @doc("[Required] The sample rate of the target data, should be greater than 0 and at most 1.") + @visibility("read", "create") + samplingRate: float32; + + @doc("Gets or sets the workspace connection ID used to connect to the content generation endpoint.") + @visibility("read", "create") + workspaceConnectionId?: string; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "GenerationSafetyQuality"; +} + +@doc("Generation token statistics metric threshold definition.") +model GenerationTokenStatisticsMetricThreshold { + @doc("[Required] Gets or sets the feature attribution metric to calculate.") + @visibility("read", "create") + metric: GenerationTokenStatisticsMetric; + + @doc(""" +Gets or sets the threshold value. +If null, a default value will be set depending on the selected metric. +""") + @visibility("read", "create") + threshold?: MonitoringThreshold; +} + +@doc("Generation token statistics signal definition.") +model GenerationTokenStatisticsSignal extends MonitoringSignalBase { + @doc("[Required] Gets or sets the metrics to calculate and the corresponding thresholds.") + @visibility("read", "create") + metricThresholds: GenerationTokenStatisticsMetricThreshold[]; + + @doc("Gets or sets the target data for computing metrics.") + @visibility("read", "create") + productionData?: MonitoringInputDataBase; + + @doc("[Required] The sample rate of the target data, should be greater than 0 and at most 1.") + @visibility("read", "create") + samplingRate: float32; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "GenerationTokenStatistics"; +} + +@doc("Defines a Sampling Algorithm that exhaustively generates every value combination in the space") +model GridSamplingAlgorithm extends SamplingAlgorithm { + @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") + samplingAlgorithmType: "Grid"; +} + +model HdfsDatastore extends Datastore { + @doc("The TLS cert of the HDFS server. Needs to be a base64 encoded string. Required if \"Https\" protocol is selected.") + @visibility("read", "create") + hdfsServerCertificate?: string; + + @doc("[Required] IP Address or DNS HostName.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + nameNodeAddress: string; + + @doc("Protocol used to communicate with the storage account (Https/Http).") + @visibility("read", "create") + protocol?: string; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "Hdfs"; +} + +@doc(""" +Image Classification. Multi-class image classification is used when an image is classified with only a single label +from a set of classes - e.g. each image is classified as either an image of a 'cat' or a 'dog' or a 'duck'. +""") +model ImageClassification extends AutoMLVertical { + ...ImageClassificationBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageClassification"; +} + +model ImageClassificationBase extends ImageVertical { + @doc("Settings used for training the model.") + modelSettings?: ImageModelSettingsClassification; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: ImageModelDistributionSettingsClassification[]; +} + +@doc(""" +Settings used for training the model. +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelSettingsClassification extends ImageModelSettings { + @doc("Image crop size that is input to the neural network for the training dataset. Must be a positive integer.") + trainingCropSize?: int32; + + @doc("Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.") + validationCropSize?: int32; + + @doc("Image size to which to resize before cropping for validation dataset. Must be a positive integer.") + validationResizeSize?: int32; + + @doc(""" +Weighted loss. The accepted values are 0 for no weighted loss. +1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. +""") + weightedLoss?: int32; +} + +@doc(""" +Settings used for training the model. +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelSettings { + @doc("Settings for advanced scenarios.") + advancedSettings?: string; + + @doc("Enable AMSGrad when optimizer is 'adam' or 'adamw'.") + amsGradient?: boolean; + + @doc("Settings for using Augmentations.") + augmentations?: string; + + @doc("Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta1?: float32; + + @doc("Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta2?: float32; + + @doc("Frequency to store model checkpoints. Must be a positive integer.") + checkpointFrequency?: int32; + + @doc("The pretrained checkpoint model for incremental training.") + checkpointModel?: MLFlowModelJobInput; + + @doc("The id of a previous run that has a pretrained checkpoint for incremental training.") + checkpointRunId?: string; + + @doc("Whether to use distributed training.") + distributed?: boolean; + + @doc("Enable early stopping logic during training.") + earlyStopping?: boolean; + + @doc(""" +Minimum number of epochs or validation evaluations to wait before primary metric improvement +is tracked for early stopping. Must be a positive integer. +""") + earlyStoppingDelay?: int32; + + @doc(""" +Minimum number of epochs or validation evaluations with no primary metric improvement before +the run is stopped. Must be a positive integer. +""") + earlyStoppingPatience?: int32; + + @doc("Enable normalization when exporting ONNX model.") + enableOnnxNormalization?: boolean; + + @doc("Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.") + evaluationFrequency?: int32; + + @doc(""" +Gradient accumulation means running a configured number of \"GradAccumulationStep\" steps without +updating the model weights while accumulating the gradients of those steps, and then using +the accumulated gradients to compute the weight updates. Must be a positive integer. +""") + gradientAccumulationStep?: int32; + + @doc(""" +Number of layers to freeze for the model. Must be a positive integer. +For instance, passing 2 as value for 'seresnext' means +freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please +see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + layersToFreeze?: int32; + + @doc("Initial learning rate. Must be a float in the range [0, 1].") + learningRate?: float32; + + @doc("Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.") + learningRateScheduler?: LearningRateScheduler; + + @doc(""" +Name of the model to use for training. +For more information on the available models please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + modelName?: string; + + @doc("Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].") + momentum?: float32; + + @doc("Enable nesterov when optimizer is 'sgd'.") + nesterov?: boolean; + + @doc("Number of training epochs. Must be a positive integer.") + numberOfEpochs?: int32; + + @doc("Number of data loader workers. Must be a non-negative integer.") + numberOfWorkers?: int32; + + @doc("Type of optimizer.") + optimizer?: StochasticOptimizer; + + @doc("Random seed to be used when using deterministic training.") + randomSeed?: int32; + + @doc("Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].") + stepLRGamma?: float32; + + @doc("Value of step size when learning rate scheduler is 'step'. Must be a positive integer.") + stepLRStepSize?: int32; + + @doc("Training batch size. Must be a positive integer.") + trainingBatchSize?: int32; + + @doc("Validation batch size. Must be a positive integer.") + validationBatchSize?: int32; + + @doc("Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].") + warmupCosineLRCycles?: float32; + + @doc("Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.") + warmupCosineLRWarmupEpochs?: int32; + + @doc("Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].") + weightDecay?: float32; +} + +model MLFlowModelJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "mlflow_model"; +} + +@doc(""" +Distribution expressions to sweep over values of model settings. + +Some examples are: +``` +ModelName = \"choice('seresnext', 'resnest50')\"; +LearningRate = \"uniform(0.001, 0.01)\"; +LayersToFreeze = \"choice(0, 2)\"; +``` +For more details on how to compose distribution expressions please check the documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelDistributionSettingsClassification + extends ImageModelDistributionSettings { + @doc("Image crop size that is input to the neural network for the training dataset. Must be a positive integer.") + trainingCropSize?: string; + + @doc("Image crop size that is input to the neural network for the validation dataset. Must be a positive integer.") + validationCropSize?: string; + + @doc("Image size to which to resize before cropping for validation dataset. Must be a positive integer.") + validationResizeSize?: string; + + @doc(""" +Weighted loss. The accepted values are 0 for no weighted loss. +1 for weighted loss with sqrt.(class_weights). 2 for weighted loss with class_weights. Must be 0 or 1 or 2. +""") + weightedLoss?: string; +} + +@doc(""" +Distribution expressions to sweep over values of model settings. + +Some examples are: +``` +ModelName = \"choice('seresnext', 'resnest50')\"; +LearningRate = \"uniform(0.001, 0.01)\"; +LayersToFreeze = \"choice(0, 2)\"; +``` +All distributions can be specified as distribution_name(min, max) or choice(val1, val2, ..., valn) +where distribution name can be: uniform, quniform, loguniform, etc +For more details on how to compose distribution expressions please check the documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelDistributionSettings { + @doc("Enable AMSGrad when optimizer is 'adam' or 'adamw'.") + amsGradient?: string; + + @doc("Settings for using Augmentations.") + augmentations?: string; + + @doc("Value of 'beta1' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta1?: string; + + @doc("Value of 'beta2' when optimizer is 'adam' or 'adamw'. Must be a float in the range [0, 1].") + beta2?: string; + + @doc("Whether to use distributer training.") + distributed?: string; + + @doc("Enable early stopping logic during training.") + earlyStopping?: string; + + @doc(""" +Minimum number of epochs or validation evaluations to wait before primary metric improvement +is tracked for early stopping. Must be a positive integer. +""") + earlyStoppingDelay?: string; + + @doc(""" +Minimum number of epochs or validation evaluations with no primary metric improvement before +the run is stopped. Must be a positive integer. +""") + earlyStoppingPatience?: string; + + @doc("Enable normalization when exporting ONNX model.") + enableOnnxNormalization?: string; + + @doc("Frequency to evaluate validation dataset to get metric scores. Must be a positive integer.") + evaluationFrequency?: string; + + @doc(""" +Gradient accumulation means running a configured number of \"GradAccumulationStep\" steps without +updating the model weights while accumulating the gradients of those steps, and then using +the accumulated gradients to compute the weight updates. Must be a positive integer. +""") + gradientAccumulationStep?: string; + + @doc(""" +Number of layers to freeze for the model. Must be a positive integer. +For instance, passing 2 as value for 'seresnext' means +freezing layer0 and layer1. For a full list of models supported and details on layer freeze, please +see: https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + layersToFreeze?: string; + + @doc("Initial learning rate. Must be a float in the range [0, 1].") + learningRate?: string; + + @doc("Type of learning rate scheduler. Must be 'warmup_cosine' or 'step'.") + learningRateScheduler?: string; + + @doc(""" +Name of the model to use for training. +For more information on the available models please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") + modelName?: string; + + @doc("Value of momentum when optimizer is 'sgd'. Must be a float in the range [0, 1].") + momentum?: string; + + @doc("Enable nesterov when optimizer is 'sgd'.") + nesterov?: string; + + @doc("Number of training epochs. Must be a positive integer.") + numberOfEpochs?: string; + + @doc("Number of data loader workers. Must be a non-negative integer.") + numberOfWorkers?: string; + + @doc("Type of optimizer. Must be either 'sgd', 'adam', or 'adamw'.") + optimizer?: string; + + @doc("Random seed to be used when using deterministic training.") + randomSeed?: string; + + @doc("Value of gamma when learning rate scheduler is 'step'. Must be a float in the range [0, 1].") + stepLRGamma?: string; + + @doc("Value of step size when learning rate scheduler is 'step'. Must be a positive integer.") + stepLRStepSize?: string; + + @doc("Training batch size. Must be a positive integer.") + trainingBatchSize?: string; + + @doc("Validation batch size. Must be a positive integer.") + validationBatchSize?: string; + + @doc("Value of cosine cycle when learning rate scheduler is 'warmup_cosine'. Must be a float in the range [0, 1].") + warmupCosineLRCycles?: string; + + @doc("Value of warmup epochs when learning rate scheduler is 'warmup_cosine'. Must be a positive integer.") + warmupCosineLRWarmupEpochs?: string; + + @doc("Value of weight decay when optimizer is 'sgd', 'adam', or 'adamw'. Must be a float in the range[0, 1].") + weightDecay?: string; +} + +@doc(""" +Abstract class for AutoML tasks that train image (computer vision) models - +such as Image Classification / Image Classification Multilabel / Image Object Detection / Image Instance Segmentation. +""") +model ImageVertical { + @doc("[Required] Limit settings for the AutoML job.") + limitSettings: ImageLimitSettings; + + @doc("Model sweeping and hyperparameter sweeping related settings.") + sweepSettings?: ImageSweepSettings; + + @doc("Validation data inputs.") + validationData?: MLTableJobInput; + + @doc(""" +The fraction of training dataset that needs to be set aside for validation purpose. +Values between (0.0 , 1.0) +Applied when validation dataset is not provided. +""") + validationDataSize?: float32; +} + +@doc("Limit settings for the AutoML job.") +model ImageLimitSettings { + @doc("Maximum number of concurrent AutoML iterations.") + maxConcurrentTrials?: int32; + + @doc("Maximum number of AutoML iterations.") + maxTrials?: int32; + + @doc("AutoML job timeout.") + timeout?: duration; +} + +@doc("Model sweeping and hyperparameter sweeping related settings.") +model ImageSweepSettings { + @doc("Type of early termination policy.") + earlyTermination?: EarlyTerminationPolicy; + + @doc("[Required] Type of the hyperparameter sampling algorithms.") + samplingAlgorithm: SamplingAlgorithmType; +} + +@doc(""" +Image Classification Multilabel. Multi-label image classification is used when an image could have one or more labels +from a set of labels - e.g. an image could be labeled with both 'cat' and 'dog'. +""") +model ImageClassificationMultilabel extends AutoMLVertical { + ...ImageClassificationBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: ClassificationMultilabelPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageClassificationMultilabel"; +} + +@doc(""" +Image Instance Segmentation. Instance segmentation is used to identify objects in an image at the pixel level, +drawing a polygon around each object in the image. +""") +model ImageInstanceSegmentation extends AutoMLVertical { + ...ImageObjectDetectionBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: InstanceSegmentationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageInstanceSegmentation"; +} + +model ImageObjectDetectionBase extends ImageVertical { + @doc("Settings used for training the model.") + modelSettings?: ImageModelSettingsObjectDetection; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: ImageModelDistributionSettingsObjectDetection[]; +} + +@doc(""" +Settings used for training the model. +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelSettingsObjectDetection extends ImageModelSettings { + @doc(""" +Maximum number of detections per image, for all classes. Must be a positive integer. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + boxDetectionsPerImage?: int32; + + @doc(""" +During inference, only return proposals with a classification score greater than +BoxScoreThreshold. Must be a float in the range[0, 1]. +""") + boxScoreThreshold?: float32; + + @doc(""" +Image size for train and validation. Must be a positive integer. +Note: The training run may get into CUDA OOM if the size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + imageSize?: int32; + + @doc("Enable computing and logging training metrics.") + logTrainingMetrics?: LogTrainingMetrics; + + @doc("Enable computing and logging validation loss.") + logValidationLoss?: LogValidationLoss; + + @doc(""" +Maximum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + maxSize?: int32; + + @doc(""" +Minimum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + minSize?: int32; + + @doc(""" +Model size. Must be 'small', 'medium', 'large', or 'xlarge'. +Note: training run may get into CUDA OOM if the model size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + modelSize?: ModelSize; + + @doc(""" +Enable multi-scale image by varying image size by +/- 50%. +Note: training run may get into CUDA OOM if no sufficient GPU memory. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + multiScale?: boolean; + + @doc("IOU threshold used during inference in NMS post processing. Must be a float in the range [0, 1].") + nmsIouThreshold?: float32; + + @doc(""" +The grid size to use for tiling each image. Note: TileGridSize must not be +None to enable small object detection logic. A string containing two integers in mxn format. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileGridSize?: string; + + @doc(""" +Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileOverlapRatio?: float32; + + @doc(""" +The IOU threshold to use to perform NMS while merging predictions from tiles and image. +Used in validation/ inference. Must be float in the range [0, 1]. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tilePredictionsNmsThreshold?: float32; + + @doc("IOU threshold to use when computing validation metric. Must be float in the range [0, 1].") + validationIouThreshold?: float32; + + @doc("Metric computation method to use for validation metrics.") + validationMetricType?: ValidationMetricType; +} + +@doc(""" +Distribution expressions to sweep over values of model settings. + +Some examples are: +``` +ModelName = \"choice('seresnext', 'resnest50')\"; +LearningRate = \"uniform(0.001, 0.01)\"; +LayersToFreeze = \"choice(0, 2)\"; +``` +For more details on how to compose distribution expressions please check the documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters +For more information on the available settings please visit the official documentation: +https://docs.microsoft.com/en-us/azure/machine-learning/how-to-auto-train-image-models. +""") +model ImageModelDistributionSettingsObjectDetection + extends ImageModelDistributionSettings { + @doc(""" +Maximum number of detections per image, for all classes. Must be a positive integer. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + boxDetectionsPerImage?: string; + + @doc(""" +During inference, only return proposals with a classification score greater than +BoxScoreThreshold. Must be a float in the range[0, 1]. +""") + boxScoreThreshold?: string; + + @doc(""" +Image size for train and validation. Must be a positive integer. +Note: The training run may get into CUDA OOM if the size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + imageSize?: string; + + @doc(""" +Maximum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + maxSize?: string; + + @doc(""" +Minimum size of the image to be rescaled before feeding it to the backbone. +Must be a positive integer. Note: training run may get into CUDA OOM if the size is too big. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + minSize?: string; + + @doc(""" +Model size. Must be 'small', 'medium', 'large', or 'xlarge'. +Note: training run may get into CUDA OOM if the model size is too big. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + modelSize?: string; + + @doc(""" +Enable multi-scale image by varying image size by +/- 50%. +Note: training run may get into CUDA OOM if no sufficient GPU memory. +Note: This settings is only supported for the 'yolov5' algorithm. +""") + multiScale?: string; + + @doc("IOU threshold used during inference in NMS post processing. Must be float in the range [0, 1].") + nmsIouThreshold?: string; + + @doc(""" +The grid size to use for tiling each image. Note: TileGridSize must not be +None to enable small object detection logic. A string containing two integers in mxn format. +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileGridSize?: string; + + @doc(""" +Overlap ratio between adjacent tiles in each dimension. Must be float in the range [0, 1). +Note: This settings is not supported for the 'yolov5' algorithm. +""") + tileOverlapRatio?: string; + + @doc(""" +The IOU threshold to use to perform NMS while merging predictions from tiles and image. +Used in validation/ inference. Must be float in the range [0, 1]. +Note: This settings is not supported for the 'yolov5' algorithm. +NMS: Non-maximum suppression +""") + tilePredictionsNmsThreshold?: string; + + @doc("IOU threshold to use when computing validation metric. Must be float in the range [0, 1].") + validationIouThreshold?: string; + + @doc("Metric computation method to use for validation metrics. Must be 'none', 'coco', 'voc', or 'coco_voc'.") + validationMetricType?: string; +} + +@doc(""" +Image Object Detection. Object detection is used to identify objects in an image and locate each object with a +bounding box e.g. locate all dogs and cats in an image and draw a bounding box around each. +""") +model ImageObjectDetection extends AutoMLVertical { + ...ImageObjectDetectionBase; + + @doc("Primary metric to optimize for this task.") + primaryMetric?: ObjectDetectionPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "ImageObjectDetection"; +} + +model ImportDataAction extends ScheduleActionBase { + @doc("[Required] Defines Schedule action definition details.") + @visibility("read", "create", "update") + dataImportDefinition: DataImport; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "ImportData"; +} + +model JobScheduleAction extends ScheduleActionBase { + @doc("[Required] Defines Schedule action definition details.") + @visibility("read", "create", "update") + jobDefinition: JobBase; + + @doc("[Required] Specifies the action type of the schedule") + actionType: "CreateJob"; +} + +model KerberosCredentials { + @doc("[Required] IP Address or DNS HostName.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosKdcAddress: string; + + @doc("[Required] Kerberos Username") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosPrincipal: string; + + @doc("[Required] Domain over which a Kerberos authentication server has the authority to authenticate a user, host or service.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + kerberosRealm: string; +} + +model KerberosKeytabCredentials extends DatastoreCredentials { + ...KerberosCredentials; + + @doc("[Required] Keytab secrets.") + @visibility("create", "update") + secrets: KerberosKeytabSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "KerberosKeytab"; +} + +model KerberosKeytabSecrets extends DatastoreSecrets { + @doc("Kerberos keytab secret.") + kerberosKeytab?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "KerberosKeytab"; +} + +model KerberosPasswordCredentials extends DatastoreCredentials { + ...KerberosCredentials; + + @doc("[Required] Kerberos password secrets.") + @visibility("create", "update") + secrets: KerberosPasswordSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "KerberosPassword"; +} + +model KerberosPasswordSecrets extends DatastoreSecrets { + @doc("Kerberos password secret.") + kerberosPassword?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "KerberosPassword"; +} + +@doc("Properties specific to a KubernetesOnlineDeployment.") +model KubernetesOnlineDeployment extends OnlineDeployment { + @doc("The resource requirements for the container (cpu and memory).") + containerResourceRequirements?: ContainerResourceRequirements; + + @doc("[Required] The compute type of the endpoint.") + endpointComputeType: "Kubernetes"; +} + +@doc("Properties of a labeling job for image data") +model LabelingJobImageProperties extends LabelingJobMediaProperties { + @doc("Annotation type of image labeling job.") + @visibility("read", "create") + annotationType?: ImageAnnotationType; + + @doc("[Required] Media type of the job.") + mediaType: "Image"; +} + +@doc("Properties of a labeling job for text data") +model LabelingJobTextProperties extends LabelingJobMediaProperties { + @doc("Annotation type of text labeling job.") + @visibility("read", "create") + annotationType?: TextAnnotationType; + + @doc("[Required] Media type of the job.") + mediaType: "Text"; +} + +model LakeHouseArtifact extends OneLakeArtifact { + @doc("[Required] OneLake artifact type") + artifactType: "LakeHouse"; +} + +@doc("OneLake artifact (data source) configuration.") +@discriminator("artifactType") +model OneLakeArtifact { + @doc("[Required] OneLake artifact name") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + artifactName: string; +} + +@doc("Literal input type.") +model LiteralJobInput extends JobInput { + @doc("[Required] Literal value for the input.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + value: string; + + @doc("[Required] Specifies the type of job.") + jobInputType: "literal"; +} + +@doc("Labeling MLAssist configuration definition when MLAssist is disabled") +model MLAssistConfigurationDisabled extends MLAssistConfiguration { + @doc("[Required] Indicates whether MLAssist feature is enabled.") + mlAssist: "Disabled"; +} + +@doc("Labeling MLAssist configuration definition when MLAssist is enabled") +model MLAssistConfigurationEnabled extends MLAssistConfiguration { + @doc("[Required] AML compute binding used in inferencing.") + @visibility("read", "create", "update") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + inferencingComputeBinding: string; + + @doc("[Required] AML compute binding used in training.") + @visibility("read", "create", "update") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + trainingComputeBinding: string; + + @doc("[Required] Indicates whether MLAssist feature is enabled.") + mlAssist: "Enabled"; +} + +model MLFlowModelJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "mlflow_model"; +} + +@doc("MLTable data definition") +model MLTableData extends DataVersionBase { + @doc("Uris referenced in the MLTable definition (required for lineage)") + @visibility("read", "create") + referencedUris?: string[]; + + @doc("[Required] Specifies the type of data.") + dataType: "mltable"; +} + +model MLTableJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "mltable"; +} + +@doc("Managed compute identity definition.") +model ManagedComputeIdentity extends MonitorComputeIdentityBase { + @doc("Managed service identity (system assigned and/or user assigned identities)") + identity?: ManagedServiceIdentity; + + @doc("[Required] Monitor compute identity type enum.") + computeIdentityType: "ManagedIdentity"; +} + +@doc("Managed identity configuration.") +model ManagedIdentity extends IdentityConfiguration { + @doc("Specifies a user-assigned identity by client ID. For system-assigned, do not set this field.") + @visibility("read", "create") + clientId?: string; + + @doc("Specifies a user-assigned identity by object ID. For system-assigned, do not set this field.") + @visibility("read", "create") + objectId?: string; + + @doc("Specifies a user-assigned identity by ARM resource ID. For system-assigned, do not set this field.") + @visibility("read", "create") + resourceId?: string; + + @doc("[Required] Specifies the type of identity framework.") + identityType: "Managed"; +} + +@doc("Properties specific to a ManagedOnlineDeployment.") +model ManagedOnlineDeployment extends OnlineDeployment { + @doc("[Required] The compute type of the endpoint.") + endpointComputeType: "Managed"; +} + +@doc("Defines an early termination policy based on running averages of the primary metric of all runs") +model MedianStoppingPolicy extends EarlyTerminationPolicy { + @doc("[Required] Name of policy configuration") + policyType: "MedianStopping"; +} + +@doc("Model performance signal definition.") +model ModelPerformanceSignal extends MonitoringSignalBase { + @doc("The data segment.") + @visibility("read", "create") + dataSegment?: MonitoringDataSegment; + + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThreshold: ModelPerformanceMetricThresholdBase; + + @doc("[Required] The data produced by the production service which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase[]; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "ModelPerformance"; +} + +@doc("Monitor serverless spark compute definition.") +model MonitorServerlessSparkCompute extends MonitorComputeConfigurationBase { + @doc("[Required] The identity scheme leveraged to by the spark jobs running on serverless Spark.") + @visibility("read", "create") + computeIdentity: MonitorComputeIdentityBase; + + @doc("[Required] The instance type running the Spark job.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + instanceType: string; + + @doc("[Required] The Spark runtime version.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + runtimeVersion: string; + + @doc("[Required] Specifies the type of signal to monitor.") + computeType: "ServerlessSpark"; +} + +@doc("MPI distribution configuration.") +model Mpi extends DistributionConfiguration { + @doc("Number of processes per MPI node.") + @visibility("read", "create") + processCountPerInstance?: int32; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "Mpi"; +} + +@doc("Fixed training parameters that won't be swept over during AutoML NLP training.") +model NlpFixedParameters { + @doc("Number of steps to accumulate gradients over before running a backward pass.") + gradientAccumulationSteps?: int32; + + @doc("The learning rate for the training procedure.") + learningRate?: float32; + + @doc("The type of learning rate schedule to use during the training procedure.") + learningRateScheduler?: NlpLearningRateScheduler; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Number of training epochs.") + numberOfEpochs?: int32; + + @doc("The batch size for the training procedure.") + trainingBatchSize?: int32; + + @doc("The batch size to be used during evaluation.") + validationBatchSize?: int32; + + @doc("The warmup ratio, used alongside LrSchedulerType.") + warmupRatio?: float32; + + @doc("The weight decay for the training procedure.") + weightDecay?: float32; +} + +@doc("Stringified search spaces for each parameter. See below examples.") +model NlpParameterSubspace { + @doc("Number of steps to accumulate gradients over before running a backward pass.") + gradientAccumulationSteps?: string; + + @doc("The learning rate for the training procedure.") + learningRate?: string; + + @doc("The type of learning rate schedule to use during the training procedure.") + learningRateScheduler?: string; + + @doc("The name of the model to train.") + modelName?: string; + + @doc("Number of training epochs.") + numberOfEpochs?: string; + + @doc("The batch size for the training procedure.") + trainingBatchSize?: string; + + @doc("The batch size to be used during evaluation.") + validationBatchSize?: string; + + @doc("The warmup ratio, used alongside LrSchedulerType.") + warmupRatio?: string; + + @doc("The weight decay for the training procedure.") + weightDecay?: string; +} + +@doc("Model sweeping and hyperparameter tuning related settings.") +model NlpSweepSettings { + @doc("Type of early termination policy for the sweeping job.") + earlyTermination?: EarlyTerminationPolicy; + + @doc("[Required] Type of sampling algorithm.") + samplingAlgorithm: SamplingAlgorithmType; +} + +@doc(""" +Abstract class for NLP related AutoML tasks. +NLP - Natural Language Processing. +""") +model NlpVertical { + @doc("Featurization inputs needed for AutoML job.") + featurizationSettings?: NlpVerticalFeaturizationSettings; + + @doc("Model/training parameters that will remain constant throughout training.") + fixedParameters?: NlpFixedParameters; + + @doc("Execution constraints for AutoMLJob.") + limitSettings?: NlpVerticalLimitSettings; + + @doc("Search space for sampling different combinations of models and their hyperparameters.") + searchSpace?: NlpParameterSubspace[]; + + @doc("Settings for model sweeping and hyperparameter tuning.") + sweepSettings?: NlpSweepSettings; + + @doc("Validation data inputs.") + validationData?: MLTableJobInput; +} + +model NlpVerticalFeaturizationSettings extends FeaturizationSettings {} + +@doc("Job execution constraints.") +model NlpVerticalLimitSettings { + @doc("Maximum Concurrent AutoML iterations.") + maxConcurrentTrials?: int32; + + @doc("Maximum nodes to use for the experiment.") + maxNodes?: int32; + + @doc("Number of AutoML iterations.") + maxTrials?: int32; + + @doc("AutoML job timeout.") + timeout?: duration; + + @doc("Timeout for individual HD trials.") + trialTimeout?: duration; +} + +@doc("Empty/none datastore credentials.") +model NoneDatastoreCredentials extends DatastoreCredentials { + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "None"; +} + +model NumericalDataDriftMetricThreshold extends DataDriftMetricThresholdBase { + @doc("[Required] The numerical data drift metric to calculate.") + metric: NumericalDataDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Numerical"; +} + +model NumericalDataQualityMetricThreshold + extends DataQualityMetricThresholdBase { + @doc("[Required] The numerical data quality metric to calculate.") + @visibility("read", "create") + metric: NumericalDataQualityMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Numerical"; +} + +model NumericalPredictionDriftMetricThreshold + extends PredictionDriftMetricThresholdBase { + @doc("[Required] The numerical prediction drift metric to calculate.") + @visibility("read", "create") + metric: NumericalPredictionDriftMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + dataType: "Numerical"; +} + +@doc("Optimization objective.") +model Objective { + @doc("[Required] Defines supported metric goals for hyperparameter tuning") + goal: Goal; + + @doc("[Required] Name of the metric to optimize.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + primaryMetric: string; +} + +@doc("OneLake (Trident) datastore configuration.") +model OneLakeDatastore extends Datastore { + @doc("[Required] OneLake artifact backing the datastore.") + @visibility("read", "create") + artifact: OneLakeArtifact; + + @doc("OneLake endpoint to use for the datastore.") + @visibility("read", "create") + endpoint?: string; + + @doc("[Required] OneLake workspace name.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + oneLakeWorkspaceName: string; + + @doc("Indicates which identity to use to authenticate service data access to customer's storage.") + @visibility("read", "create") + serviceDataAccessAuthIdentity?: ServiceDataAccessAuthIdentity; + + @doc("[Required] Storage type backing the datastore.") + datastoreType: "OneLake"; +} + +@doc("Reference to an asset via its path in a job output.") +model OutputPathAssetReference extends AssetReferenceBase { + @doc("ARM resource ID of the job.") + jobId?: string; + + @doc("The path of the file/directory in the job output.") + path?: string; + + @doc("[Required] Specifies the type of asset reference.") + referenceType: "OutputPath"; +} + +@doc("Package input path specified with a resource id.") +model PackageInputPathId extends PackageInputPathBase { + @doc("Input resource id.") + resourceId?: string; + + @doc("[Required] Input path type for package inputs.") + inputPathType: "PathId"; +} + +@doc("Package input path specified as an url.") +model PackageInputPathUrl extends PackageInputPathBase { + @doc("Input path url.") + url?: string; + + @doc("[Required] Input path type for package inputs.") + inputPathType: "Url"; +} + +@doc("Package input path specified with name and version.") +model PackageInputPathVersion extends PackageInputPathBase { + @doc("Input resource name.") + resourceName?: string; + + @doc("Input resource version.") + resourceVersion?: string; + + @doc("[Required] Input path type for package inputs.") + inputPathType: "PathVersion"; +} + +@doc("Pipeline Job definition: defines generic to MFE attributes.") +model PipelineJob extends JobBase { + @doc("Inputs for the pipeline job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Jobs construct the Pipeline Job.") + @visibility("read", "create") + jobs?: Record>; + + @doc("Outputs for the pipeline job") + @visibility("read", "create") + outputs?: Record; + + @doc("Pipeline settings, for things like ContinueRunOnStepFailure etc.") + @visibility("read", "create") + settings?: Record; + + @doc("ARM resource ID of source job.") + @visibility("read", "create") + sourceJobId?: string; + + @doc("[Required] Specifies the type of job.") + jobType: "Pipeline"; +} + +model PredictionDriftMonitoringSignal extends MonitoringSignalBase { + @doc("[Required] A list of metrics to calculate and their associated thresholds.") + @visibility("read", "create") + metricThresholds: PredictionDriftMetricThresholdBase[]; + + @doc("[Required] The type of the model monitored.") + @visibility("read", "create") + modelType: MonitoringModelType; + + @doc("[Required] The data which drift will be calculated for.") + @visibility("read", "create") + productionData: MonitoringInputDataBase; + + @doc("[Required] The data to calculate drift against.") + @visibility("read", "create") + referenceData: MonitoringInputDataBase; + + @doc("[Required] Specifies the type of signal to monitor.") + signalType: "PredictionDrift"; +} + +@doc("PyTorch distribution configuration.") +model PyTorch extends DistributionConfiguration { + @doc("Number of processes per node.") + processCountPerInstance?: int32; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "PyTorch"; +} + +@doc("Defines a Sampling Algorithm that generates values randomly") +model RandomSamplingAlgorithm extends SamplingAlgorithm { + @doc("An optional positive number or e in string format to be used as base for log based random sampling") + logbase?: string; + + @doc("The specific type of random algorithm") + rule?: RandomSamplingAlgorithmRule; + + @doc("An optional integer to use as the seed for random number generation") + seed?: int32; + + @doc("[Required] The algorithm used for generating hyperparameter values, along with configuration properties") + samplingAlgorithmType: "Random"; +} + +@doc("Ray distribution configuration.") +model Ray extends DistributionConfiguration { + @doc("The address of Ray head node.") + address?: string; + + @doc("The port to bind the dashboard server to.") + dashboardPort?: int32; + + @doc("Additional arguments passed to ray start in head node.") + headNodeAdditionalArgs?: string; + + @doc("Provide this argument to start the Ray dashboard GUI.") + includeDashboard?: boolean; + + @doc("The port of the head ray process.") + port?: int32; + + @doc("Additional arguments passed to ray start in worker node.") + workerNodeAdditionalArgs?: string; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "Ray"; +} + +@doc("Regression task in AutoML Table vertical.") +model Regression extends AutoMLVertical { + ...TableVertical; + + @doc("Primary metric for regression task.") + primaryMetric?: RegressionPrimaryMetrics; + + @doc("Inputs for training phase for an AutoML Job.") + trainingSettings?: RegressionTrainingSettings; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "Regression"; +} + +@doc("Regression Training related configuration.") +model RegressionTrainingSettings extends TrainingSettings { + @doc("Allowed models for regression task.") + allowedTrainingAlgorithms?: RegressionModels[]; + + @doc("Blocked models for regression task.") + blockedTrainingAlgorithms?: RegressionModels[]; +} + +model RegressionModelPerformanceMetricThreshold + extends ModelPerformanceMetricThresholdBase { + @doc("[Required] The regression model performance metric to calculate.") + @visibility("read", "create") + metric: RegressionModelPerformanceMetric; + + @doc("[Required] Specifies the data type of the metric threshold.") + modelType: "Regression"; +} + +model SASCredentialDto extends PendingUploadCredentialDto { + @doc("Full SAS Uri, including the storage, container/blob path and SAS token") + sasUri?: string; + + @doc("[Required] Credential type used to authentication with storage.") + credentialType: "SAS"; +} + +@doc("SAS datastore credentials configuration.") +model SasDatastoreCredentials extends DatastoreCredentials { + @doc("[Required] Storage container secrets.") + @visibility("create", "update") + secrets: SasDatastoreSecrets; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "Sas"; +} + +@doc("Datastore SAS secrets.") +model SasDatastoreSecrets extends DatastoreSecrets { + @doc("Storage container SAS token.") + sasToken?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "Sas"; +} + +@doc("Service Principal datastore credentials configuration.") +model ServicePrincipalDatastoreCredentials extends DatastoreCredentials { + @doc("Authority URL used for authentication.") + authorityUrl?: string; + + @doc("[Required] Service principal client ID.") + clientId: string; + + @doc("Resource the service principal has access to.") + resourceUrl?: string; + + @doc("[Required] Service principal secrets.") + @visibility("create", "update") + secrets: ServicePrincipalDatastoreSecrets; + + @doc("[Required] ID of the tenant to which the service principal belongs.") + tenantId: string; + + @doc("[Required] Credential type used to authentication with storage.") + credentialsType: "ServicePrincipal"; +} + +@doc("Datastore Service Principal secrets.") +model ServicePrincipalDatastoreSecrets extends DatastoreSecrets { + @doc("Service principal secret.") + clientSecret?: string; + + @doc("[Required] Credential type used to authentication with storage.") + secretsType: "ServicePrincipal"; +} + +@doc("Spark job definition.") +model SparkJob extends JobBase { + @doc("Archive files used in the job.") + @visibility("read", "create") + archives?: string[]; + + @doc("Arguments for the job.") + @visibility("read", "create") + args?: string; + + @doc("[Required] ARM resource ID of the code asset.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + codeId: string; + + @doc("Spark configured properties.") + @visibility("read", "create") + conf?: Record; + + @doc("[Required] The entry to execute on startup of the job.") + @visibility("read", "create") + entry: SparkJobEntry; + + @doc("The ARM resource ID of the Environment specification for the job.") + @visibility("read", "create") + environmentId?: string; + + @doc("Files used in the job.") + @visibility("read", "create") + files?: string[]; + + @doc("Mapping of input data bindings used in the job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Jar files used in the job.") + @visibility("read", "create") + jars?: string[]; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Python files used in the job.") + @visibility("read", "create") + pyFiles?: string[]; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: SparkResourceConfiguration; + + @doc("[Required] Specifies the type of job.") + jobType: "Spark"; +} + +@doc("Spark job entry point definition.") +@discriminator("sparkJobEntryType") +model SparkJobEntry {} + +model SparkResourceConfiguration { + @doc("Optional type of VM used as supported by the compute target.") + @visibility("read", "create") + instanceType?: string; + + @doc("Version of spark runtime used for the job.") + @visibility("read", "create") + runtimeVersion?: string; +} + +model SparkJobPythonEntry extends SparkJobEntry { + @doc("[Required] Relative python file path for job entry point.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + file: string; + + @doc("[Required] Type of the job's entry point.") + sparkJobEntryType: "SparkJobPythonEntry"; +} + +model SparkJobScalaEntry extends SparkJobEntry { + @doc("[Required] Scala class name used as entry point.") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + className: string; + + @doc("[Required] Type of the job's entry point.") + sparkJobEntryType: "SparkJobScalaEntry"; +} + +@doc("Static input data definition.") +model StaticInputData extends MonitoringInputDataBase { + @doc("The ARM resource ID of the component resource used to preprocess the data.") + @visibility("read", "create") + preprocessingComponentId?: string; + + @doc("[Required] The end date of the data window.") + @visibility("read", "create") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + windowEnd: utcDateTime; + + @doc("[Required] The start date of the data window.") + @visibility("read", "create") + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + windowStart: utcDateTime; + + @doc("[Required] Specifies the type of signal to monitor.") + inputDataType: "Static"; +} + +@doc("Sweep job definition.") +model SweepJob extends JobBase { + @doc("Early termination policies enable canceling poor-performing runs before they complete") + earlyTermination?: EarlyTerminationPolicy; + + @doc("Mapping of input data bindings used in the job.") + @visibility("read", "create") + inputs?: Record; + + @doc("Sweep Job limit.") + @visibility("read", "create") + limits?: SweepJobLimits; + + @doc("[Required] Optimization objective.") + objective: Objective; + + @doc("Mapping of output data bindings used in the job.") + @visibility("read", "create") + outputs?: Record; + + @doc("Queue settings for the job") + @visibility("read", "create") + queueSettings?: QueueSettings; + + @doc("[Required] The hyperparameter sampling algorithm") + samplingAlgorithm: SamplingAlgorithm; + + @doc("[Required] A dictionary containing each parameter and its distribution. The dictionary key is the name of the parameter") + searchSpace: Record; + + @doc("[Required] Trial component definition.") + trial: TrialComponent; + + @doc("[Required] Specifies the type of job.") + jobType: "Sweep"; +} + +@doc("Sweep Job limit class.") +model SweepJobLimits extends JobLimits { + @doc("Sweep Job max concurrent trials.") + maxConcurrentTrials?: int32; + + @doc("Sweep Job max total trials.") + maxTotalTrials?: int32; + + @doc("Sweep Job Trial timeout value.") + trialTimeout?: duration; + + @doc("[Required] JobLimit type.") + jobLimitsType: "Sweep"; +} + +@doc("Trial component definition.") +model TrialComponent { + @doc("ARM resource ID of the code asset.") + @visibility("read", "create") + codeId?: string; + + @doc("[Required] The command to execute on startup of the job. eg. \"python train.py\"") + @visibility("read", "create") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + command: string; + + @doc("Distribution configuration of the job. If set, this should be one of Mpi, Tensorflow, PyTorch, or null.") + @visibility("read", "create") + distribution?: DistributionConfiguration; + + @doc("[Required] The ARM resource ID of the Environment specification for the job.") + @minLength(1) + @pattern("[a-zA-Z0-9_]") + environmentId: string; + + @doc("Environment variables included in the job.") + @visibility("read", "create") + environmentVariables?: Record; + + @doc("Compute Resource configuration for the job.") + @visibility("read", "create") + resources?: JobResourceConfiguration; +} + +model TargetUtilizationScaleSettings extends OnlineScaleSettings { + @doc("The maximum number of instances that the deployment can scale to. The quota will be reserved for max_instances.") + maxInstances?: int32; + + @doc("The minimum number of instances to always be present.") + minInstances?: int32; + + @doc("The polling interval in ISO 8691 format. Only supports duration with precision as low as Seconds.") + pollingInterval?: duration; + + @doc("Target CPU usage for the autoscaler.") + targetUtilizationPercentage?: int32; + + @doc("[Required] Type of deployment scaling algorithm") + scaleType: "TargetUtilization"; +} + +@doc("TensorFlow distribution configuration.") +model TensorFlow extends DistributionConfiguration { + @doc("Number of parameter server tasks.") + @visibility("read", "create") + parameterServerCount?: int32; + + @doc("Number of workers. If not specified, will default to the instance count.") + @visibility("read", "create") + workerCount?: int32; + + @doc("[Required] Specifies the type of distribution framework.") + distributionType: "TensorFlow"; +} + +@doc(""" +Text Classification task in AutoML NLP vertical. +NLP - Natural Language Processing. +""") +model TextClassification extends AutoMLVertical { + ...NlpVertical; + + @doc("Primary metric for Text-Classification task.") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "TextClassification"; +} + +@doc(""" +Text Classification Multilabel task in AutoML NLP vertical. +NLP - Natural Language Processing. +""") +model TextClassificationMultilabel extends AutoMLVertical { + ...NlpVertical; + + @doc(""" +Primary metric for Text-Classification-Multilabel task. +Currently only Accuracy is supported as primary metric, hence user need not set it explicitly. +""") + @visibility("read") + primaryMetric?: ClassificationMultilabelPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "TextClassificationMultilabel"; +} + +@doc(""" +Text-NER task in AutoML NLP vertical. +NER - Named Entity Recognition. +NLP - Natural Language Processing. +""") +model TextNer extends AutoMLVertical { + ...NlpVertical; + + @doc(""" +Primary metric for Text-NER task. +Only 'Accuracy' is supported for Text-NER, so user need not set this explicitly. +""") + @visibility("read") + primaryMetric?: ClassificationPrimaryMetrics; + + @doc("[Required] Task type for AutoMLJob.") + taskType: "TextNER"; +} + +model TopNFeaturesByAttribution extends MonitoringFeatureFilterBase { + @doc("The number of top features to include.") + @visibility("read", "create") + top?: int32; + + @doc("[Required] Specifies the feature filter to leverage when selecting features to calculate metrics over.") + filterType: "TopNByAttribution"; +} + +@doc("Trailing input data definition.") +model TrailingInputData extends MonitoringInputDataBase { + @doc("The ARM resource ID of the component resource used to preprocess the data.") + @visibility("read", "create") + preprocessingComponentId?: string; + + @doc("[Required] The time offset between the end of the data window and the monitor's current run time.") + @visibility("read", "create") + windowOffset: duration; + + @doc("[Required] The size of the trailing data window.") + @visibility("read", "create") + windowSize: duration; + + @doc("[Required] Specifies the type of signal to monitor.") + inputDataType: "Trailing"; +} + +@doc("Triton inferencing server configurations.") +model TritonInferencingServer extends InferencingServer { + @doc("Inference configuration for Triton.") + inferenceConfiguration?: OnlineInferenceConfiguration; + + @doc("[Required] Inferencing server type for various targets.") + serverType: "Triton"; +} + +model TritonModelJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "triton_model"; +} + +model TritonModelJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "triton_model"; +} + +@doc("Defines an early termination policy that cancels a given percentage of runs at each evaluation interval.") +model TruncationSelectionPolicy extends EarlyTerminationPolicy { + @doc("The percentage of runs to cancel at each evaluation interval.") + truncationPercentage?: int32; + + @doc("[Required] Name of policy configuration") + policyType: "TruncationSelection"; +} + +@doc("uri-file data version entity") +model UriFileDataVersion extends DataVersionBase { + @doc("[Required] Specifies the type of data.") + dataType: "uri_file"; +} + +model UriFileJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "uri_file"; +} + +model UriFileJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "uri_file"; +} + +@doc("uri-folder data version entity") +model UriFolderDataVersion extends DataVersionBase { + @doc("[Required] Specifies the type of data.") + dataType: "uri_folder"; +} + +model UriFolderJobInput extends JobInput { + ...AssetJobInput; + + @doc("[Required] Specifies the type of job.") + jobInputType: "uri_folder"; +} + +model UriFolderJobOutput extends JobOutput { + ...AssetJobOutput; + + @doc("[Required] Specifies the type of job.") + jobOutputType: "uri_folder"; +} + +@doc("User identity configuration.") +model UserIdentity extends IdentityConfiguration { + @doc("[Required] Specifies the type of identity framework.") + identityType: "UserIdentity"; +} + +model AccessKeyAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionAccessKey; + + @doc("Authentication type of the connection target") + authType: "AccessKey"; +} + +model WorkspaceConnectionAccessKey { + accessKeyId?: string; + secretAccessKey?: string; +} + +@doc(""" +This connection type covers the generic ApiKey auth connection categories, for examples: +AzureOpenAI: + Category:= AzureOpenAI + AuthType:= ApiKey (as type discriminator) + Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= {ApiBase} + +CognitiveService: + Category:= CognitiveService + AuthType:= ApiKey (as type discriminator) + Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= ServiceRegion={serviceRegion} + +CognitiveSearch: + Category:= CognitiveSearch + AuthType:= ApiKey (as type discriminator) + Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey + Target:= {Endpoint} + +Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields +""") +model ApiKeyAuthWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + @doc("Api key object for workspace connection credential.") + credentials?: WorkspaceConnectionApiKey; + + @doc("Authentication type of the connection target") + authType: "ApiKey"; +} + +@doc("Api key object for workspace connection credential.") +model WorkspaceConnectionApiKey { + key?: string; +} + +@doc("Custom Keys credential object") +model CustomKeys { + @doc("Dictionary of ") + keys?: Record; +} + +@doc(""" +Category:= CustomKeys +AuthType:= CustomKeys (as type discriminator) +Credentials:= {CustomKeys} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.CustomKeys +Target:= {any value} +Use Metadata property bag for ApiVersion and other metadata fields +""") +model CustomKeysWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + @doc("Custom Keys credential object") + credentials?: CustomKeys; + + @doc("Authentication type of the connection target") + authType: "CustomKeys"; +} + +@doc("FQDN Outbound Rule for the managed network of a machine learning workspace.") +model FqdnOutboundRule extends OutboundRule { + destination?: string; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + type: "FQDN"; +} + +model ManagedIdentityAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionManagedIdentity; + + @doc("Authentication type of the connection target") + authType: "ManagedIdentity"; +} + +model WorkspaceConnectionManagedIdentity { + clientId?: string; + resourceId?: string; +} + +model NoneAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + @doc("Authentication type of the connection target") + authType: "None"; +} + +model PATAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionPersonalAccessToken; + + @doc("Authentication type of the connection target") + authType: "PAT"; +} + +model WorkspaceConnectionPersonalAccessToken { + pat?: string; +} + +@doc("Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") +model PrivateEndpointDestination { + serviceResourceId?: string; + sparkEnabled?: boolean; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + sparkStatus?: RuleStatus; + + subresourceTarget?: string; +} + +@doc("Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") +model PrivateEndpointOutboundRule extends OutboundRule { + @doc("Private Endpoint destination for a Private Endpoint Outbound Rule for the managed network of a machine learning workspace.") + destination?: PrivateEndpointDestination; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + type: "PrivateEndpoint"; +} + +model SASAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionSharedAccessSignature; + + @doc("Authentication type of the connection target") + authType: "SAS"; +} + +model WorkspaceConnectionSharedAccessSignature { + sas?: string; +} + +model ServicePrincipalAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionServicePrincipal; + + @doc("Authentication type of the connection target") + authType: "ServicePrincipal"; +} + +model WorkspaceConnectionServicePrincipal { + clientId?: string; + clientSecret?: string; + tenantId?: string; +} + +@doc("Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.") +model ServiceTagDestination { + @doc("The action enum for networking rule.") + action?: RuleAction; + + @doc("Optional, if provided, the ServiceTag property will be ignored.") + @visibility("read") + addressPrefixes?: string[]; + + portRanges?: string; + protocol?: string; + serviceTag?: string; +} + +@doc("Service Tag Outbound Rule for the managed network of a machine learning workspace.") +model ServiceTagOutboundRule extends OutboundRule { + @doc("Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.") + destination?: ServiceTagDestination; + + @doc("Type of a managed network Outbound Rule of a machine learning workspace.") + type: "ServiceTag"; +} + +model UsernamePasswordAuthTypeWorkspaceConnectionProperties + extends WorkspaceConnectionPropertiesV2 { + credentials?: WorkspaceConnectionUsernamePassword; + + @doc("Authentication type of the connection target") + authType: "UsernamePassword"; +} + +model WorkspaceConnectionUsernamePassword { + password?: string; + username?: string; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp new file mode 100644 index 0000000000..ebf4ed1742 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/routes.tsp @@ -0,0 +1,1608 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using Azure.ResourceManager; + +namespace Azure.ResourceManager.MachineLearning; + +interface UsagesOperations { + @doc("Gets the current usage information as well as limits for AML resources for given subscription and location.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/usages") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The location for which resource usage is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + }, + ListUsagesResult + >; +} + +interface VirtualMachineSizesOperations { + @doc("Returns supported VM Sizes in a location") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/vmSizes") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The location upon which virtual-machine-sizes is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + }, + VirtualMachineSizeListResult + >; +} + +interface QuotasOperations { + @doc("Update quota for each VM family in workspace.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/updateQuotas") + @post + Update is Azure.Core.Foundations.Operation< + { + @doc("The location for update quota is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("Quota update parameters.") + @body + parameters: QuotaUpdateParameters; + }, + UpdateWorkspaceQuotasResult + >; + + @doc("Gets the currently assigned Workspace Quotas based on VMFamily.") + @route("/subscriptions/{subscriptionId}/providers/Microsoft.MachineLearningServices/locations/{location}/quotas") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The location for which resource usage is queried.") + @pattern("^[-\\w\\._]+$") + @path + location: string; + }, + ListWorkspaceQuotas + >; +} + +interface CodeContainersOperations { + @summary("List containers.") + @doc("List containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + CodeContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: CodeContainerResource; + }, + CodeContainerResource + >; +} + +interface CodeVersionsOperations { + @summary("List versions.") + @doc("List versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("If specified, return CodeVersion assets with specified content hash value, regardless of name") + @query("hash") + hash?: string; + + @doc("Hash algorithm version when listing by hash") + @query("hashVersion") + hashVersion?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + CodeVersionResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: CodeVersionResource; + }, + CodeVersionResource + >; + + @summary("Generate a storage location and credential for the client to upload a code asset to.") + @doc("Generate a storage location and credential for the client to upload a code asset to.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/codes/{name}/versions/{version}/startPendingUpload") + @post + CreateOrGetStartPendingUpload is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Pending upload request object") + @body + body: PendingUploadRequestDto; + }, + PendingUploadResponseDto + >; +} + +interface ComponentContainersOperations { + @summary("List component containers.") + @doc("List component containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + ComponentContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: ComponentContainerResource; + }, + ComponentContainerResource + >; +} + +interface ComponentVersionsOperations { + @summary("List component versions.") + @doc("List component versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Component name.") + @path + name: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Component stage.") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + ComponentVersionResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/components/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: ComponentVersionResource; + }, + ComponentVersionResource + >; +} + +interface DataContainersOperations { + @summary("List data containers.") + @doc("List data containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + }, + DataContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: DataContainerResource; + }, + DataContainerResource + >; +} + +interface DataVersionsOperations { + @summary("List data versions in the data container") + @doc("List data versions in the data container") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Data container's name") + @path + name: string; + + @doc("Please choose OrderBy value from ['createdtime', 'modifiedtime']") + @query("$orderBy") + $orderBy?: string; + + @doc(""" +Top count of results, top count cannot be greater than the page size. + If topCount > page size, results with be default page size count will be returned +""") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("$tags") + $tags?: string; + + @doc("[ListViewType.ActiveOnly, ListViewType.ArchivedOnly, ListViewType.All]View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("data stage") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + }, + DataVersionBaseResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/data/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: DataVersionBaseResource; + }, + DataVersionBaseResource + >; +} + +interface EnvironmentContainersOperations { + @summary("List environment containers.") + @doc("List environment containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + EnvironmentContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: EnvironmentContainerResource; + }, + EnvironmentContainerResource + >; +} + +interface EnvironmentVersionsOperations { + @summary("List versions.") + @doc("List versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Stage for including/excluding (for example) archived entities. Takes priority over listViewType") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + EnvironmentVersionResource + >; + + @summary("Creates or updates an EnvironmentVersion.") + @doc("Creates or updates an EnvironmentVersion.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/environments/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Name of EnvironmentVersion. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version of EnvironmentVersion.") + @path + version: string; + + @doc("Definition of EnvironmentVersion.") + @body + body: EnvironmentVersionResource; + }, + EnvironmentVersionResource + >; +} + +interface ModelContainersOperations { + @summary("List model containers.") + @doc("List model containers.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Maximum number of results to return.") + @query("count") + count?: int32; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + }, + ResourceListResult + >; + + @summary("Delete container.") + @doc("Delete container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + void + >; + + @summary("Get container.") + @doc("Get container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + }, + ModelContainerResource + >; + + @summary("Create or update container.") + @doc("Create or update container.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Container entity to create or update.") + @body + body: ModelContainerResource; + }, + ModelContainerResource + >; +} + +interface ModelVersionsOperations { + @summary("List model versions.") + @doc("List model versions.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions") + @get + List is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Model name. This is case-sensitive.") + @path + name: string; + + @doc("Continuation token for pagination.") + @query("$skip") + $skip?: string; + + @doc("Ordering of list.") + @query("$orderBy") + $orderBy?: string; + + @doc("Maximum number of records to return.") + @query("$top") + $top?: int32; + + @doc("Model version.") + @query("version") + version?: string; + + @doc("Model description.") + @query("description") + description?: string; + + @doc("Number of initial results to skip.") + @query("offset") + offset?: int32; + + @doc("Comma-separated list of tag names (and optionally values). Example: tag1,tag2=value2") + @query("tags") + tags?: string; + + @doc("Comma-separated list of property names (and optionally values). Example: prop1,prop2=value2") + @query("properties") + properties?: string; + + @doc("Name of the feed.") + @query("feed") + feed?: string; + + @doc("View type for including/excluding (for example) archived entities.") + @query("listViewType") + listViewType?: ListViewType; + + @doc("Model stage") + @query("stage") + stage?: string; + }, + ResourceListResult + >; + + @summary("Delete version.") + @doc("Delete version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @delete + Delete is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + void + >; + + @summary("Get version.") + @doc("Get version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @get + Get is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + }, + ModelVersionResource + >; + + @summary("Create or update version.") + @doc("Create or update version.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}") + @put + CreateOrUpdate is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Version entity to create or update.") + @body + body: ModelVersionResource; + }, + ModelVersionResource + >; + + @summary("Model Version Package operation.") + @doc("Model Version Package operation.") + @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/models/{name}/versions/{version}/package") + @post + Package is Azure.Core.Foundations.Operation< + { + @doc("The ID of the target subscription.") + @minLength(1) + @path + subscriptionId: string; + + @doc("The name of the resource group. The name is case insensitive.") + @maxLength(90) + @minLength(1) + @path + resourceGroupName: string; + + @doc("Name of Azure Machine Learning workspace.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9_-]{2,32}$") + @path + workspaceName: string; + + @doc("Container name. This is case-sensitive.") + @pattern("^[a-zA-Z0-9][a-zA-Z0-9\\-_]{0,254}$") + @path + name: string; + + @doc("Version identifier. This is case-sensitive.") + @path + version: string; + + @doc("Package operation request body.") + @body + body: PackageRequest; + }, + PackageResponse | void + >; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml new file mode 100644 index 0000000000..691f3c1b0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-machinelearningservices/tsp-output/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: "resource-manager" + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/openapi.json" + examples-directory: "{project-root}/examples" +linter: + extends: + - "@azure-tools/typespec-azure-resource-manager/all" diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp index 759eed6348..1c93686250 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProduct.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; @doc("The data product resource.") @@ -27,39 +29,62 @@ model DataProduct is TrackedResource { interface DataProducts { @doc("Retrieve data product resource.") get is ArmResourceRead; + @doc("Create data product resource.") - create is ArmResourceCreateOrUpdateAsync; + create is ArmResourceCreateOrUpdateAsync< + DataProduct, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update data product resource.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + DataProduct, + DataProductUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete data product resource.") - delete is ArmResourceDeleteWithoutOkAsync; + delete is ArmResourceDeleteWithoutOkAsync< + DataProduct, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List data products by resource group.") listByResourceGroup is ArmResourceListByParent; + @doc("List data products by subscription.") listBySubscription is ArmListBySubscription; + @doc("Assign role to the data product.") addUserRole is ArmResourceActionSync< DataProduct, RoleAssignmentCommonProperties, RoleAssignmentDetail >; + @doc("Generate sas token for storage account.") generateStorageAccountSasToken is ArmResourceActionSync< DataProduct, AccountSas, AccountSasToken >; + @doc("List user roles associated with the data product.") listRolesAssignments is ArmResourceActionSync< DataProduct, Record, ListRoleAssignments >; + @doc("Remove role from the data product.") removeUserRole is ArmResourceActionNoContentSync< DataProduct, RoleAssignmentDetail >; + @doc("Initiate key rotation on Data Product.") rotateKey is ArmResourceActionNoContentSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp index 6226f421a8..7759d93cbb 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataProductsCatalog.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,12 +8,13 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; @doc("The data catalog resource.") @singleton("default") model DataProductsCatalog is ProxyResource { - @key("default") + @key("dataProductsCatalog") @segment("dataProductsCatalogs") name: string; } @@ -21,8 +23,10 @@ model DataProductsCatalog is ProxyResource { interface DataProductsCatalogs { @doc("Retrieve data type resource.") get is ArmResourceRead; + @doc("List data catalog by subscription.") listBySubscription is ArmListBySubscription; + @doc("List data catalog by resource group.") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp index 22401df7ef..a861e80f76 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/DataType.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DataProduct.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.NetworkAnalytics; @doc("The data type resource.") @@ -27,19 +29,40 @@ model DataType is ProxyResource { interface DataTypes { @doc("Retrieve data type resource.") get is ArmResourceRead; + @doc("Create data type resource.") - create is ArmResourceCreateOrUpdateAsync; + create is ArmResourceCreateOrUpdateAsync< + DataType, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update data type resource.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + DataType, + DataTypeUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete data type resource.") - delete is ArmResourceDeleteWithoutOkAsync; + delete is ArmResourceDeleteWithoutOkAsync< + DataType, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List data type by parent resource.") listByDataProduct is ArmResourceListByParent; + @doc("Delete data for data type.") deleteData is ArmResourceActionNoResponseContentAsync< DataType, - Record + Record, + BaseParameters, + ArmLroLocationHeader >; + @doc("Generate sas token for storage container.") generateStorageContainerSasToken is ArmResourceActionSync< DataType, diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json new file mode 100644 index 0000000000..f19498286d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGen.json @@ -0,0 +1,45 @@ +{ + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..7ecf733626 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_Get_DataProductsCatalogsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProductsCatalogs_Get", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..02e8bd1673 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListByResourceGroup_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json new file mode 100644 index 0000000000..5c7486f6e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListByResourceGroup_DataProductsCatalogsListByResourceGroupMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataProductsCatalogs_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListByResourceGroup_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..0003a9f385 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMaximumSetGen.json @@ -0,0 +1,49 @@ +{ + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListBySubscription_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "default", + "type": "Microsoft.NetworkAnalytics/dataProductsCatalogs", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default", + "properties": { + "provisioningState": "Succeeded", + "publishers": [ + { + "dataProducts": [ + { + "description": "Official data product for Mobile Content Cloud.", + "dataProductName": "MCC", + "dataProductVersions": [ + { + "version": "1.0.0" + } + ] + } + ], + "publisherName": "Microsoft" + } + ] + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json new file mode 100644 index 0000000000..4c2b8e3fa1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProductsCatalogs_ListBySubscription_DataProductsCatalogsListBySubscriptionMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataProductsCatalogs_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProductsCatalogs_ListBySubscription_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProductsCatalogs/default" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json new file mode 100644 index 0000000000..6926baacb1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGen.json @@ -0,0 +1,35 @@ +{ + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_AddUserRole_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..32984a0046 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_AddUserRole_DataProductsAddUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,35 @@ +{ + "operationId": "DataProducts_AddUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "userName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_AddUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "userName" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json new file mode 100644 index 0000000000..f7b151ed00 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGen.json @@ -0,0 +1,252 @@ +{ + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resource": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "location": "eastus", + "properties": { + "consumptionEndpoints": {}, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Create_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "201": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..2ea69e94ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Create_DataProductsCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,38 @@ +{ + "operationId": "DataProducts_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resource": { + "location": "eastus", + "properties": { + "majorVersion": "1.0.0", + "product": "MCC", + "publisher": "Microsoft" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json new file mode 100644 index 0000000000..f63b07ab43 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Delete_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..4248e15d2d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Delete_DataProductsDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json new file mode 100644 index 0000000000..52130bf9a7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:34:58.151Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:34:58.151Z" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..39abd7936a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_GenerateStorageAccountSasToken_DataProductsGenerateStorageAccountSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataProducts_GenerateStorageAccountSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:35:17.051Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:35:17.051Z" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_GenerateStorageAccountSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "storageAccountSasToken": "storageAccountSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json new file mode 100644 index 0000000000..3576486a01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGen.json @@ -0,0 +1,102 @@ +{ + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..1a0370845c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Get_DataProductsGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataProducts_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json new file mode 100644 index 0000000000..20ac87c3a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGen.json @@ -0,0 +1,106 @@ +{ + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..f6c75a1f84 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListByResourceGroup_DataProductsListByResourceGroupMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "operationId": "DataProducts_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-15", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListByResourceGroup_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json new file mode 100644 index 0000000000..c093d02db4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGen.json @@ -0,0 +1,105 @@ +{ + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListBySubscription_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetworkAnalytics/DataProducts?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..789767c921 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListBySubscription_DataProductsListBySubscriptionMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataProducts_ListBySubscription", + "parameters": { + "api-version": "2023-11-15", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListBySubscription_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "location": "eastus" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json new file mode 100644 index 0000000000..aa82e992e6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGen.json @@ -0,0 +1,31 @@ +{ + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..5f896b0f01 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_ListRolesAssignments_DataProductsListRolesAssignmentsMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,31 @@ +{ + "operationId": "DataProducts_ListRolesAssignments", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_ListRolesAssignments_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "count": 1, + "roleAssignmentResponse": [ + { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json new file mode 100644 index 0000000000..4842556a31 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGen.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..ec8a03137c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RemoveUserRole_DataProductsRemoveUserRoleMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,24 @@ +{ + "operationId": "DataProducts_RemoveUserRole", + "parameters": { + "api-version": "2023-11-15", + "body": { + "dataTypeScope": [ + "scope" + ], + "principalId": "00000000-0000-0000-0000-00000000000", + "principalType": "User", + "role": "Reader", + "roleAssignmentId": "00000000-0000-0000-0000-00000000000", + "roleId": "00000000-0000-0000-0000-00000000000", + "userName": "UserName" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RemoveUserRole_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json new file mode 100644 index 0000000000..c47672f0c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RotateKey_MaximumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..cc85062d1d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_RotateKey_DataProductsRotateKeyMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,16 @@ +{ + "operationId": "DataProducts_RotateKey", + "parameters": { + "api-version": "2023-11-15", + "body": { + "keyVaultUrl": "https://myKeyVault.vault.azure.net" + }, + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_RotateKey_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json new file mode 100644 index 0000000000..20fc36725c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGen.json @@ -0,0 +1,129 @@ +{ + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "properties": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/subid/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id1": {} + } + }, + "properties": { + "currentMinorVersion": "1.0.1", + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "privateLinksEnabled": "Disabled", + "purviewAccount": "testpurview", + "purviewCollection": "134567890" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Update_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "dataproduct01", + "type": "Microsoft.NetworkAnalytics/DataProducts", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01", + "identity": { + "type": "IdentityType", + "principalId": "00000000-0000-0000-0000-000000000000", + "tenantId": "00000000-0000-0000-0000-000000000000", + "userAssignedIdentities": { + "key8474": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "location": "eastus", + "properties": { + "availableMinorVersions": [ + "1.0.1", + "1.0.2" + ], + "consumptionEndpoints": { + "fileAccessResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "fileAccessUrl": "https://operatorinsightsstorageResourceName.blob.core.windows.net", + "ingestionResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/storageResourceName", + "ingestionUrl": "https://aoiingestionstorageResourceName.blob.core.windows.net", + "queryResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.Kusto/clusters/clusterName", + "queryUrl": "https://opinsightsclusterName.regionName.kusto.windows.net" + }, + "currentMinorVersion": "1.0.1", + "customerEncryptionKey": { + "keyName": "keyName", + "keyVaultUri": "https://KeyVault.vault.azure.net", + "keyVersion": "keyVersion" + }, + "customerManagedKeyEncryptionEnabled": "Enabled", + "documentation": "https://learn.microsoft.com/", + "keyVaultUrl": "https://myKeyVault.vault.azure.net", + "majorVersion": "1.0.0", + "managedResourceGroupConfiguration": { + "name": "managedResourceGroupName", + "location": "eastus" + }, + "networkacls": { + "allowedQueryIpRangeList": [ + "1.1.1.1", + "1.1.1.2" + ], + "defaultAction": "Allow", + "ipRules": [ + { + "action": "Allow", + "value": "1.1.1.1" + } + ], + "virtualNetworkRule": [ + { + "action": "Allow", + "id": "/subscriptions/subscriptionId/resourcegroups/resourceGroupName/providers/Microsoft.Network/virtualNetworks/virtualNetworkName/subnets/subnetName", + "state": "Succeeded" + } + ] + }, + "owners": [ + "abc@micros.com", + "def@micros.com" + ], + "privateLinksEnabled": "Disabled", + "product": "MCC", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "publisher": "Microsoft", + "purviewAccount": "testpurview", + "purviewCollection": "134567890", + "redundancy": "Disabled", + "resourceGuid": "00000000-0000-0000-0000-000000000000" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + }, + "tags": { + "userSpecifiedKeyName": "userSpecifiedKeyValue" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..ef1715d60f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataProducts_Update_DataProductsUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataProducts_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "properties": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataProducts_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "location": "jwlerdaudgxff" + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json new file mode 100644 index 0000000000..12d0d18499 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGen.json @@ -0,0 +1,73 @@ +{ + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": { + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "storageOutputRetention": 27 + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Create_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypeName", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + }, + "201": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + }, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..dc1ffed225 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Create_DataTypesCreateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_Create", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resource": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Create_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": {} + }, + "201": { + "body": {}, + "headers": { + "Azure-AsyncOperation": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json new file mode 100644 index 0000000000..11928e44f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMaximumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_DeleteData_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json new file mode 100644 index 0000000000..f6ba6d7f3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_DeleteData_DataTypesDeleteDataMinimumSetGen.json @@ -0,0 +1,20 @@ +{ + "operationId": "DataTypes_DeleteData", + "parameters": { + "api-version": "2023-11-15", + "body": {}, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_DeleteData_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json new file mode 100644 index 0000000000..32ccacb328 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Delete_MaximumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..aa28902546 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Delete_DataTypesDeleteMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,19 @@ +{ + "operationId": "DataTypes_Delete", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Delete_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json new file mode 100644 index 0000000000..162c8ec470 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:34:58.039Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:34:58.039Z" + }, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..05800b2f8b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_GenerateStorageContainerSasToken_DataTypesGenerateStorageContainerSasTokenMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,23 @@ +{ + "operationId": "DataTypes_GenerateStorageContainerSasToken", + "parameters": { + "api-version": "2023-11-15", + "body": { + "expiryTimeStamp": "2023-08-24T05:35:16.887Z", + "ipAddress": "1.1.1.1", + "startTimeStamp": "2023-08-24T05:35:16.887Z" + }, + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_GenerateStorageContainerSasToken_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "storageContainerSasToken": "storageContainerSasToken" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json new file mode 100644 index 0000000000..c420e2a626 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGen.json @@ -0,0 +1,37 @@ +{ + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Get_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..92f277bda0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Get_DataTypesGetMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,18 @@ +{ + "operationId": "DataTypes_Get", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Get_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json new file mode 100644 index 0000000000..8db6542baa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGen.json @@ -0,0 +1,41 @@ +{ + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/DataProducts/dataproduct01/dataTypes?api-version=2023-11-15$skiptoken=aaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "value": [ + { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 23, + "databaseRetention": 6, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "state Reason", + "storageOutputRetention": 27, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..2ead5d9ce9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_ListByDataProduct_DataTypesListByDataProductMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,21 @@ +{ + "operationId": "DataTypes_ListByDataProduct", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_ListByDataProduct_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json new file mode 100644 index 0000000000..4dea0837f5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGen.json @@ -0,0 +1,50 @@ +{ + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": { + "properties": { + "databaseCacheRetention": 16, + "databaseRetention": 9, + "state": "STARTED", + "storageOutputRetention": 30 + } + }, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Update_MaximumSet_Gen", + "responses": { + "200": { + "body": { + "name": "datatypename", + "type": "Microsoft.NetworkAnalytics/DataProducts/DataTypes", + "id": "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/aoiresourceGroupName/providers/Microsoft.NetworkAnalytics/dataProducts/dataproduct01/dataTypes/datatypename", + "properties": { + "databaseCacheRetention": 16, + "databaseRetention": 9, + "provisioningState": "Succeeded", + "state": "STARTED", + "stateReason": "State Reason", + "storageOutputRetention": 30, + "visualizationUrl": "visualizationUrl" + }, + "systemData": { + "createdAt": "2023-09-04T08:26:27.1506343Z", + "createdBy": "abc@micros.com", + "createdByType": "User", + "lastModifiedAt": "2023-09-04T08:26:27.1506343Z", + "lastModifiedBy": "abc@micros.com", + "lastModifiedByType": "User" + } + } + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json new file mode 100644 index 0000000000..868a1de1ce --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/examples/2023-11-15/DataTypes_Update_DataTypesUpdateMaximumSetGenGeneratedByMinimumSetRuleMinimumSetGen.json @@ -0,0 +1,22 @@ +{ + "operationId": "DataTypes_Update", + "parameters": { + "api-version": "2023-11-15", + "dataProductName": "dataproduct01", + "dataTypeName": "datatypename", + "properties": {}, + "resourceGroupName": "aoiresourceGroupName", + "subscriptionId": "00000000-0000-0000-0000-00000000000" + }, + "title": "DataTypes_Update_MaximumSet_Gen - generated by [MinimumSet] rule_MinimumSet_Gen", + "responses": { + "200": { + "body": {} + }, + "202": { + "headers": { + "location": "https://contoso.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp index 0138b59aa4..0d5a7bfb66 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/main.tsp @@ -26,5 +26,6 @@ namespace Microsoft.NetworkAnalytics; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-11-15 API version.") v2023_11_15: "2023-11-15", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp index a46998a192..000b481277 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-networkanalytics/tsp-output/models.tsp @@ -5,21 +5,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.NetworkAnalytics; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The status of the current operation.") enum ProvisioningState { @doc("Represents a succeeded operation.") Succeeded, @doc("Represents a failed operation.") Failed, @@ -30,16 +34,19 @@ enum ProvisioningState { @doc("Represents an accepted operation.") Accepted, } +@doc("The data type state") enum ControlState { @doc("Field to enable a setting.") Enabled, @doc("Field to disable a setting.") Disabled, } +@doc("Specifies the default action of allow or deny when no other rules match.") enum DefaultAction { @doc("Represents allow action.") Allow, @doc("Represents deny action.") Deny, } +@doc("Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).") enum ManagedServiceIdentityType { None, SystemAssigned, @@ -47,6 +54,7 @@ enum ManagedServiceIdentityType { `SystemAssigned, UserAssigned`, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -54,6 +62,7 @@ enum CreatedByType { Key, } +@doc("The data type state") enum DataProductUserRole { @doc("Field to specify user of type Reader.") Reader, @doc(""" @@ -63,11 +72,13 @@ This user has privileged access to read sensitive data of a data product. SensitiveReader, } +@doc("The data type state") enum DataTypeState { @doc("Field to specify stopped state.") Stopped, @doc("Field to specify running state.") Running, } +@doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") enum Bypass { @doc("Represents no bypassing of traffic.") None, @doc("Represents bypassing logging traffic.") Logging, @@ -254,15 +265,23 @@ model ConsumptionEndpointsProperties { ]>; } -@doc("User assigned identity properties") -model UserAssignedIdentity { - @doc("The principal ID of the assigned identity.") +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") @visibility("read") - principalId?: string; + id?: string; - @doc("The client ID of the assigned identity.") + @doc("The name of the resource") @visibility("read") - clientId?: string; + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; } @doc("Details for data catalog properties.") @@ -302,6 +321,41 @@ model DataProductVersion { version: string; } +@doc("The type used for update operations of the DataProduct.") +model DataProductUpdate { + @doc("The managed service identities assigned to this resource.") + identity?: ManagedServiceIdentity; + + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the DataProduct.") + properties?: DataProductUpdateProperties; +} + +@doc("The updatable properties of the DataProduct.") +model DataProductUpdateProperties { + @doc("List of name or email associated with data product resource deployment.") + @visibility("read", "create", "update") + owners?: string[]; + + @doc("Purview account url for data product to connect to.") + @visibility("read", "create", "update") + purviewAccount?: string; + + @doc("Purview collection url for data product to connect to.") + @visibility("read", "create", "update") + purviewCollection?: string; + + @doc("Flag to enable or disable private link for data product resource.") + @visibility("read", "create", "update") + privateLinksEnabled?: ControlState; + + @doc("Current configured minor version of the data product resource.") + @visibility("read", "update") + currentMinorVersion?: string; +} + @doc("The details for role assignment common properties.") model RoleAssignmentCommonProperties { @doc("Role Id of the Built-In Role") @@ -378,6 +432,31 @@ model DataTypeProperties { visualizationUrl?: string; } +@doc("The type used for update operations of the DataType.") +model DataTypeUpdate { + @doc("The updatable properties of the DataType.") + properties?: DataTypeUpdateProperties; +} + +@doc("The updatable properties of the DataType.") +model DataTypeUpdateProperties { + @doc("State of data type.") + @visibility("read", "create", "update") + state?: DataTypeState; + + @doc("Field for storage output retention in days.") + @visibility("read", "create", "update") + storageOutputRetention?: int32; + + @doc("Field for database cache retention in days.") + @visibility("read", "create", "update") + databaseCacheRetention?: int32; + + @doc("Field for database data retention in days.") + @visibility("read", "create", "update") + databaseRetention?: int32; +} + @doc("The details for container sas creation.") model ContainerSaS { @doc("Sas token start timestamp.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp index a2b505309a..11f78c415a 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Account.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzurePlaywrightService; @doc("An account resource") @@ -25,14 +27,27 @@ model Account is TrackedResource { interface Accounts { @doc("Get a Account") get is ArmResourceRead; + @doc("Create a Account") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Account, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Account") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Delete a Account") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Account, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Account resources by resource group") listByResourceGroup is ArmResourceListByParent; + @doc("List Account resources by subscription ID") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp index 265c873d2b..8f28cf8d23 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/Quota.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzurePlaywrightService; @doc("A quota resource") @@ -23,6 +25,7 @@ model Quota is ProxyResource { interface Quotas { @doc("Get quota by name.") get is ArmResourceRead; + @doc("List quotas for a given subscription Id.") listBySubscription is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json new file mode 100644 index 0000000000..0527cb1c82 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_CreateOrUpdate.json @@ -0,0 +1,76 @@ +{ + "operationId": "Accounts_CreateOrUpdate", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resource": { + "location": "westus", + "properties": { + "regionalAffinity": "Enabled" + }, + "tags": { + "Team": "Dev Exp" + } + }, + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_CreateOrUpdate", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + }, + "201": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + }, + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2023-06-01-preview" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json new file mode 100644 index 0000000000..5e69c18b42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Delete.json @@ -0,0 +1,19 @@ +{ + "operationId": "Accounts_Delete", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Delete", + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-06-01-preview" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json new file mode 100644 index 0000000000..2ded0c48b1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "Accounts_Get", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Get", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json new file mode 100644 index 0000000000..7bfc80e402 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListByResourceGroup.json @@ -0,0 +1,41 @@ +{ + "operationId": "Accounts_ListByResourceGroup", + "parameters": { + "api-version": "2023-10-01-preview", + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_ListByResourceGroup", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json new file mode 100644 index 0000000000..af33e2310b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_ListBySubscription.json @@ -0,0 +1,40 @@ +{ + "operationId": "Accounts_ListBySubscription", + "parameters": { + "api-version": "2023-10-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_ListBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json new file mode 100644 index 0000000000..0c2f290ae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Accounts_Update.json @@ -0,0 +1,47 @@ +{ + "operationId": "Accounts_Update", + "parameters": { + "name": "myPlaywrightAccount", + "api-version": "2023-10-01-preview", + "properties": { + "properties": { + "regionalAffinity": "Enabled" + }, + "tags": { + "Division": "LT", + "Team": "Dev Exp" + } + }, + "resourceGroupName": "dummyrg", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Accounts_Update", + "responses": { + "200": { + "body": { + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "reporting": "Enabled", + "scalableExecution": "Enabled" + }, + "systemData": { + "createdAt": "2021-09-28T12:32:33Z", + "createdBy": "userId1001", + "createdByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User" + }, + "tags": { + "Team": "Dev Exp" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json new file mode 100644 index 0000000000..f4895fbab2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_Get.json @@ -0,0 +1,31 @@ +{ + "operationId": "Quotas_Get", + "parameters": { + "name": "ScalableExecution", + "api-version": "2023-10-01-preview", + "location": "eastus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Quotas_Get", + "responses": { + "200": { + "body": { + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "allocatedValue": 0, + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "percentageUsed": 100, + "state": "Active", + "usedValue": 0 + }, + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json new file mode 100644 index 0000000000..1b47a7e382 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/examples/2023-10-01-preview/Quotas_ListBySubscription.json @@ -0,0 +1,34 @@ +{ + "operationId": "Quotas_ListBySubscription", + "parameters": { + "api-version": "2023-10-01-preview", + "location": "eastus", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Quotas_ListBySubscription", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "allocatedValue": 0, + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "percentageUsed": 100, + "state": "Active", + "usedValue": 0 + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp index f12cab8719..5104445bb5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/main.tsp @@ -25,5 +25,6 @@ namespace Microsoft.AzurePlaywrightService; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-10-01-preview API version.") v2023_10_01_preview: "2023-10-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp index 96f5cde292..bfbc6f61e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-playwrighttesting/tsp-output/models.tsp @@ -5,26 +5,31 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.AzurePlaywrightService; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The enablement status of a feature.") enum EnablementStatus { @doc("The feature is Enabled.") Enabled, @doc("The feature is Disabled.") Disabled, } +@doc("The status of the current operation.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -33,6 +38,7 @@ enum ProvisioningState { @doc("Change accepted for processing") Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -40,6 +46,7 @@ enum CreatedByType { Key, } +@doc("The free-trial state.") enum FreeTrialState { @doc("The free-trial is Active.") Active, @doc("The free-trial is Expired.") Expired, @@ -70,6 +77,25 @@ model AccountProperties { provisioningState?: ProvisioningState; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + @doc("Quota properties") model QuotaProperties { @doc("The free-trial quota.") @@ -113,3 +139,24 @@ model FreeTrialProperties { @visibility("read") state: FreeTrialState; } + +@doc("The type used for update operations of the Account.") +model AccountUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Account.") + properties?: AccountUpdateProperties; +} + +@doc("The updatable properties of the Account.") +model AccountUpdateProperties { + @doc("This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.") + regionalAffinity?: EnablementStatus; + + @doc("When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") + scalableExecution?: EnablementStatus; + + @doc("When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.") + reporting?: EnablementStatus; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp index 44dbcc0851..86bea2ae80 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Association.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./TrafficController.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; @doc("Association Subresource of Traffic Controller") @@ -22,15 +24,37 @@ model Association is TrackedResource { } @armResourceOperations -interface AssociationsInterface { +interface Associations { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get a Association") + @operationId("AssociationsInterface_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create a Association") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("AssociationsInterface_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Association, + BaseParameters, + ArmAsyncOperationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a Association") - update is ArmResourcePatchSync; + @operationId("AssociationsInterface_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a Association") - delete is ArmResourceDeleteAsync; + @operationId("AssociationsInterface_Delete") + delete is ArmResourceDeleteAsync< + Association, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List Association resources by TrafficController") + @operationId("AssociationsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp index 7d4d454beb..24461bd64c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/Frontend.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./TrafficController.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; @doc("Frontend Subresource of Traffic Controller.") @@ -22,15 +24,37 @@ model Frontend is TrackedResource { } @armResourceOperations -interface FrontendsInterface { +interface Frontends { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get a Frontend") + @operationId("FrontendsInterface_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create a Frontend") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("FrontendsInterface_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Frontend, + BaseParameters, + ArmAsyncOperationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a Frontend") - update is ArmTagsPatchSync; + @operationId("FrontendsInterface_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a Frontend") - delete is ArmResourceDeleteAsync; + @operationId("FrontendsInterface_Delete") + delete is ArmResourceDeleteAsync< + Frontend, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List Frontend resources by TrafficController") + @operationId("FrontendsInterface_ListByTrafficController") listByTrafficController is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp index 52369417fc..2aaf3fdbd4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/TrafficController.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.ServiceNetworking; @doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.") @@ -20,17 +22,42 @@ model TrafficController is TrackedResource { } @armResourceOperations -interface TrafficControllerInterface { +interface TrafficControllers { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Get a TrafficController") + @operationId("TrafficControllerInterface_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Create a TrafficController") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + @operationId("TrafficControllerInterface_CreateOrUpdate") + createOrUpdate is ArmResourceCreateOrUpdateAsync< + TrafficController, + BaseParameters, + ArmAsyncOperationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Update a TrafficController") - update is ArmTagsPatchSync; + @operationId("TrafficControllerInterface_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Delete a TrafficController") - delete is ArmResourceDeleteAsync; + @operationId("TrafficControllerInterface_Delete") + delete is ArmResourceDeleteAsync< + TrafficController, + BaseParameters, + ArmLroLocationHeader + >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List TrafficController resources by resource group") + @operationId("TrafficControllerInterface_ListByResourceGroup") listByResourceGroup is ArmResourceListByParent; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List TrafficController resources by subscription ID") + @operationId("TrafficControllerInterface_ListBySubscription") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json new file mode 100644 index 0000000000..2893cb5f73 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_CreateOrUpdate.json @@ -0,0 +1,51 @@ +{ + "operationId": "AssociationsInterface_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "resource": { + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Put Association", + "responses": { + "200": { + "body": { + "name": "associatedvnet-1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "provisioningState": "Accepted", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + }, + "201": { + "body": { + "name": "associatedvnet-1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json new file mode 100644 index 0000000000..7a451c65e2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Delete.json @@ -0,0 +1,21 @@ +{ + "operationId": "AssociationsInterface_Delete", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Delete Association", + "responses": { + "200": {}, + "202": { + "headers": { + "Retry-After": 3, + "location": "https://blobLocation.com" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json new file mode 100644 index 0000000000..c49d723c9d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Get.json @@ -0,0 +1,28 @@ +{ + "operationId": "AssociationsInterface_Get", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Association", + "responses": { + "200": { + "body": { + "name": "as1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "provisioningState": "Succeeded", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json new file mode 100644 index 0000000000..0791850af8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_ListByTrafficController.json @@ -0,0 +1,31 @@ +{ + "operationId": "AssociationsInterface_ListByTrafficController", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Associations", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "as1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "provisioningState": "Succeeded", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json new file mode 100644 index 0000000000..10db57ec99 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/AssociationsInterface_Update.json @@ -0,0 +1,35 @@ +{ + "operationId": "AssociationsInterface_Update", + "parameters": { + "api-version": "2023-11-01", + "associationName": "as1", + "properties": { + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Update Association", + "responses": { + "200": { + "body": { + "name": "as1", + "type": "Microsoft.ServiceNetworking/trafficControllers/associations", + "id": "/subscriptions/subid/resourcegroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/associations/as1", + "location": "NorthCentralUS", + "properties": { + "associationType": "subnets", + "subnet": { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet-tc/subnets/tc-subnet" + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json new file mode 100644 index 0000000000..a4a9d318ea --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_CreateOrUpdate.json @@ -0,0 +1,41 @@ +{ + "operationId": "FrontendsInterface_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "resource": { + "location": "NorthCentralUS", + "properties": {} + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Put Frontend", + "responses": { + "200": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json new file mode 100644 index 0000000000..a2a44b5489 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Delete.json @@ -0,0 +1,21 @@ +{ + "operationId": "FrontendsInterface_Delete", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Delete Frontend", + "responses": { + "200": {}, + "202": { + "headers": { + "Retry-After": 3, + "location": "https://blobLocation.com" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json new file mode 100644 index 0000000000..b61e2a5790 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Get.json @@ -0,0 +1,25 @@ +{ + "operationId": "FrontendsInterface_Get", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Frontend", + "responses": { + "200": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json new file mode 100644 index 0000000000..981cd6bccb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_ListByTrafficController.json @@ -0,0 +1,28 @@ +{ + "operationId": "FrontendsInterface_ListByTrafficController", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Frontends", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json new file mode 100644 index 0000000000..b09a9b78db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/FrontendsInterface_Update.json @@ -0,0 +1,26 @@ +{ + "operationId": "FrontendsInterface_Update", + "parameters": { + "api-version": "2023-11-01", + "frontendName": "fe1", + "properties": {}, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Update Frontend", + "responses": { + "200": { + "body": { + "name": "fe1", + "type": "Microsoft.ServiceNetworking/trafficControllers/frontends", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1", + "location": "NorthCentralUS", + "properties": { + "fqdn": "test.net", + "provisioningState": "Succeeded" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json new file mode 100644 index 0000000000..bd04a8e2b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_CreateOrUpdate.json @@ -0,0 +1,72 @@ +{ + "operationId": "TrafficControllerInterface_CreateOrUpdate", + "parameters": { + "api-version": "2023-11-01", + "resource": { + "location": "NorthCentralUS", + "tags": { + "key1": "value1" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Put Traffic Controller", + "responses": { + "200": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + }, + "201": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json new file mode 100644 index 0000000000..6d16e849bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Delete.json @@ -0,0 +1,20 @@ +{ + "operationId": "TrafficControllerInterface_Delete", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Delete Traffic Controller", + "responses": { + "200": {}, + "202": { + "headers": { + "Retry-After": 3, + "location": "https://blobLocation.com" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json new file mode 100644 index 0000000000..5e4b154ed5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Get.json @@ -0,0 +1,39 @@ +{ + "operationId": "TrafficControllerInterface_Get", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Get Traffic Controller", + "responses": { + "200": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json new file mode 100644 index 0000000000..bce2a37c5a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListByResourceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "TrafficControllerInterface_ListByResourceGroup", + "parameters": { + "api-version": "2023-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "title": "Get Traffic Controllers", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json new file mode 100644 index 0000000000..ad60cd8f3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_ListBySubscription.json @@ -0,0 +1,41 @@ +{ + "operationId": "TrafficControllerInterface_ListBySubscription", + "parameters": { + "api-version": "2023-11-01", + "subscriptionId": "subid" + }, + "title": "Get Traffic Controllers List", + "responses": { + "200": { + "body": { + "value": [ + { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json new file mode 100644 index 0000000000..a87a1dc53b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/examples/2023-11-01/TrafficControllerInterface_Update.json @@ -0,0 +1,44 @@ +{ + "operationId": "TrafficControllerInterface_Update", + "parameters": { + "api-version": "2023-11-01", + "properties": { + "tags": { + "key1": "value1" + } + }, + "resourceGroupName": "rg1", + "subscriptionId": "subid", + "trafficControllerName": "tc1" + }, + "title": "Patch Traffic Controller", + "responses": { + "200": { + "body": { + "name": "tc1", + "type": "Microsoft.ServiceNetworking/trafficControllers", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1", + "location": "NorthCentralUS", + "properties": { + "associations": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/association/as1" + } + ], + "configurationEndpoints": [ + "abc.trafficcontroller.azure.net" + ], + "frontends": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ServiceNetworking/trafficControllers/tc1/frontends/fe1" + } + ], + "provisioningState": "Succeeded" + }, + "tags": { + "key1": "value1" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp index 58a6d5ad04..f43a83d3c4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/main.tsp @@ -26,5 +26,6 @@ namespace Microsoft.ServiceNetworking; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-11-01 API version.") v2023_11_01: "2023-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp index 90db8d685c..8e6698a47c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-servicenetworking/tsp-output/models.tsp @@ -5,17 +5,20 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.ServiceNetworking; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } @@ -30,6 +33,7 @@ enum ProvisioningState { Canceled, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -66,6 +70,31 @@ model ResourceId { id: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the TrafficController.") +model TrafficControllerUpdate { + @doc("Resource tags.") + tags?: Record; +} + @doc("Association Properties.") model AssociationProperties { @doc("Association Type") @@ -85,6 +114,24 @@ model AssociationSubnet { id: string; } +@doc("The type used for update operations of the Association.") +model AssociationUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Association.") + properties?: AssociationUpdateProperties; +} + +@doc("The updatable properties of the Association.") +model AssociationUpdateProperties { + @doc("Association Type") + associationType?: AssociationType; + + @doc("Association Subnet") + subnet?: AssociationSubnetUpdate; +} + @doc("Association Subnet.") model AssociationSubnetUpdate { @doc("Association ID.") @@ -101,3 +148,9 @@ model FrontendProperties { @visibility("read") provisioningState?: ProvisioningState; } + +@doc("The type used for update operations of the Frontend.") +model FrontendUpdate { + @doc("Resource tags.") + tags?: Record; +} diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp index 869cf0ab7a..7e495e9eff 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Catalog.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An Azure Sphere catalog") @@ -23,18 +25,33 @@ model Catalog is TrackedResource { interface Catalogs { @doc("Get a Catalog") get is ArmResourceRead; + @doc("Create a Catalog") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Catalog, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Catalog") - update is ArmTagsPatchSync; + update is ArmCustomPatchSync; + @doc("Delete a Catalog") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Catalog, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Catalog resources by resource group") listByResourceGroup is ArmResourceListByParent; + @doc("List Catalog resources by subscription ID") listBySubscription is ArmListBySubscription; + @doc("Counts devices in catalog.") countDevices is ArmResourceActionSync; + @doc("Lists deployments for catalog.") listDeployments is ArmResourceActionSync< Catalog, @@ -60,6 +77,7 @@ interface Catalogs { maxpagesize?: int32; } >; + @doc("List the device groups for the catalog.") listDeviceGroups is ArmResourceActionSync< Catalog, @@ -85,6 +103,7 @@ interface Catalogs { maxpagesize?: int32; } >; + @doc("Lists device insights for catalog.") listDeviceInsights is ArmResourceActionSync< Catalog, @@ -110,6 +129,7 @@ interface Catalogs { maxpagesize?: int32; } >; + @doc("Lists devices for catalog.") listDevices is ArmResourceActionSync< Catalog, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp index eef2369bc3..e42f42210e 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Certificate.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Catalog.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An certificate resource belonging to a catalog resource.") @@ -24,6 +26,7 @@ model Certificate is ProxyResource { interface Certificates { @doc("Get a Certificate") get is ArmResourceRead; + @doc("List Certificate resources by Catalog") listByCatalog is ArmResourceListByParent< Certificate, @@ -47,12 +50,14 @@ interface Certificates { maxpagesize?: int32; } >; + @doc("Retrieves cert chain.") retrieveCertChain is ArmResourceActionSync< Certificate, void, CertificateChainResponse >; + @doc("Gets the proof of possession nonce.") retrieveProofOfPossessionNonce is ArmResourceActionSync< Certificate, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp index 99143202c2..5550a848b5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Deployment.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DeviceGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An deployment resource belonging to a device group resource.") @@ -24,10 +26,21 @@ model Deployment is ProxyResource { interface Deployments { @doc("Get a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") get is ArmResourceRead; + @doc("Create a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Deployment, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Delete a Deployment. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Deployment, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Deployment resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") listByDeviceGroup is ArmResourceListByParent< Deployment, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp index b9a03e0e57..493c8e138f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Device.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./DeviceGroup.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An device resource belonging to a device group resource.") @@ -25,18 +27,38 @@ model Device is ProxyResource { interface Devices { @doc("Get a Device. Use '.unassigned' or '.default' for the device group and product names when a device does not belong to a device group and product.") get is ArmResourceRead; + @doc("Create a Device. Use '.unassigned' or '.default' for the device group and product names to claim a device to the catalog only.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Device, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Device. Use '.unassigned' or '.default' for the device group and product names to move a device to the catalog level.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + Device, + DeviceUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete a Device") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Device, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Device resources by DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") listByDeviceGroup is ArmResourceListByParent; + @doc("Generates the capability image for the device. Use '.unassigned' or '.default' for the device group and product names to generate the image for a device that does not belong to a specific device group and product.") generateCapabilityImage is ArmResourceActionAsync< Device, GenerateCapabilityImageRequest, - SignedCapabilityImageResponse + SignedCapabilityImageResponse, + BaseParameters, + ArmLroLocationHeader >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp index de7e6b89fd..59128d7d7f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/DeviceGroup.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Product.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An device group resource belonging to a product resource.") @@ -25,12 +27,29 @@ model DeviceGroup is ProxyResource { interface DeviceGroups { @doc("Get a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") get is ArmResourceRead; + @doc("Create a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + DeviceGroup, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + DeviceGroup, + DeviceGroupUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete a DeviceGroup. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + DeviceGroup, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List DeviceGroup resources by Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") listByProduct is ArmResourceListByParent< DeviceGroup, @@ -54,11 +73,15 @@ interface DeviceGroups { maxpagesize?: int32; } >; + @doc("Bulk claims the devices. Use '.unassigned' or '.default' for the device group and product names when bulk claiming devices to a catalog only.") claimDevices is ArmResourceActionNoResponseContentAsync< DeviceGroup, - ClaimDevicesRequest + ClaimDevicesRequest, + BaseParameters, + ArmLroLocationHeader >; + @doc("Counts devices in device group. '.default' and '.unassigned' are system defined values and cannot be used for product or device group name.") countDevices is ArmResourceActionSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp index 6f4ac2a2ac..936f1d80b4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Image.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Catalog.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An image resource belonging to a catalog resource.") @@ -24,10 +26,21 @@ model Image is ProxyResource { interface Images { @doc("Get a Image") get is ArmResourceRead; + @doc("Create a Image") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Image, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Delete a Image") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Image, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Image resources by Catalog") listByCatalog is ArmResourceListByParent< Image, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp index 6612b66f7b..e8a338b248 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/Product.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Catalog.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.AzureSphere; @doc("An product resource belonging to a catalog resource.") @@ -25,16 +27,35 @@ model Product is ProxyResource { interface Products { @doc("Get a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") get is ArmResourceRead; + @doc("Create a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Product, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") - update is ArmResourcePatchAsync; + update is ArmCustomPatchAsync< + Product, + ProductUpdate, + BaseParameters, + ArmLroLocationHeader + >; + @doc("Delete a Product. '.default' and '.unassigned' are system defined values and cannot be used for product name'") - delete is ArmResourceDeleteAsync; + delete is ArmResourceDeleteAsync< + Product, + BaseParameters, + ArmLroLocationHeader + >; + @doc("List Product resources by Catalog") listByCatalog is ArmResourceListByParent; + @doc("Counts devices in product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") countDevices is ArmResourceActionSync; + @doc("Generates default device groups for the product. '.default' and '.unassigned' are system defined values and cannot be used for product name.") generateDefaultDeviceGroups is ArmResourceActionSync< Product, diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json new file mode 100644 index 0000000000..8e98c0b30a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CountDevices.json @@ -0,0 +1,18 @@ +{ + "operationId": "Catalogs_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json new file mode 100644 index 0000000000..12fbb285cf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Catalogs_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "location": "global", + "resource": { + "location": "global" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json new file mode 100644 index 0000000000..9cf48d1b3a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Delete.json @@ -0,0 +1,24 @@ +{ + "operationId": "Catalogs_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json new file mode 100644 index 0000000000..ffff8db7cc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Get.json @@ -0,0 +1,21 @@ +{ + "operationId": "Catalogs_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json new file mode 100644 index 0000000000..f52192cbc0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListByResourceGroup.json @@ -0,0 +1,30 @@ +{ + "operationId": "Catalogs_ListByResourceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListByResourceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + }, + { + "name": "MyCatalog2", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog2", + "location": "global" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json new file mode 100644 index 0000000000..2b1412903d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListBySubscription.json @@ -0,0 +1,29 @@ +{ + "operationId": "Catalogs_ListBySubscription", + "parameters": { + "api-version": "2022-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListBySubscription", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + }, + { + "name": "MyCatalog2", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup2/providers/Microsoft.AzureSphere/catalogs/MyCatalog2", + "location": "global" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json new file mode 100644 index 0000000000..d64d0282cb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeployments.json @@ -0,0 +1,27 @@ +{ + "operationId": "Catalogs_ListDeployments", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeployments", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "DeploymentName1111", + "properties": {} + }, + { + "name": "DeploymentName1121", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json new file mode 100644 index 0000000000..2ab4b6b559 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceGroups.json @@ -0,0 +1,32 @@ +{ + "operationId": "Catalogs_ListDeviceGroups", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "listDeviceGroupsRequest": { + "deviceGroupName": "MyDeviceGroup1" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeviceGroups", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1" + }, + { + "name": "MyDeviceGroup2", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2/devicegroups/MyDeviceGroup2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json new file mode 100644 index 0000000000..72fe42e06e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDeviceInsights.json @@ -0,0 +1,40 @@ +{ + "operationId": "Catalogs_ListDeviceInsights", + "parameters": { + "$top": 10, + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDeviceInsights", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "description": "eventDescription1", + "deviceId": "eventIdentifier1", + "endTimestampUtc": "2021-09-30T23:54:21.96Z", + "eventCategory": "eventCategory1", + "eventClass": "eventClass1", + "eventCount": 1, + "eventType": "eventType1", + "startTimestampUtc": "2021-09-30T21:51:39.26Z" + }, + { + "description": "eventDescription2", + "deviceId": "eventIdentifier2", + "endTimestampUtc": "2022-12-07T17:34:12.50Z", + "eventCategory": "eventCategory2", + "eventClass": "eventClass2", + "eventCount": 1, + "eventType": "eventType2", + "startTimestampUtc": "2022-12-06T12:41:39.26Z" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json new file mode 100644 index 0000000000..7f72d39e0c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_ListDevices.json @@ -0,0 +1,27 @@ +{ + "operationId": "Catalogs_ListDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_ListDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": {} + }, + { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json new file mode 100644 index 0000000000..5ecd11ed68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Catalogs_Update.json @@ -0,0 +1,25 @@ +{ + "operationId": "Catalogs_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "properties": {}, + "resource": { + "location": "global" + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Catalogs_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyCatalog1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1", + "location": "global" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json new file mode 100644 index 0000000000..05e8533ac8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_Get.json @@ -0,0 +1,17 @@ +{ + "operationId": "Certificates_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "default", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": {} + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json new file mode 100644 index 0000000000..ba01741148 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_ListByCatalog.json @@ -0,0 +1,18 @@ +{ + "operationId": "Certificates_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json new file mode 100644 index 0000000000..07608e0fd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveCertChain.json @@ -0,0 +1,19 @@ +{ + "operationId": "Certificates_RetrieveCertChain", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "active", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_RetrieveCertChain", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "certificateChain": "ABynaryRepresentationOfTheRequestedCatalogCertificateChain" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json new file mode 100644 index 0000000000..d3a73c7b0f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Certificates_RetrieveProofOfPossessionNonce.json @@ -0,0 +1,22 @@ +{ + "operationId": "Certificates_RetrieveProofOfPossessionNonce", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "proofOfPossessionNonceRequest": { + "proofOfPossessionNonce": "proofOfPossessionNonce" + }, + "resourceGroupName": "MyResourceGroup1", + "serialNumber": "active", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Certificates_RetrieveProofOfPossessionNonce", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "certificate": "bXliYXNlNjRzdHJpbmc=" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json new file mode 100644 index 0000000000..ef3ca50bbc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_CreateOrUpdate.json @@ -0,0 +1,47 @@ +{ + "operationId": "Deployments_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeployment1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "image": "MyImage", + "imageId": "00000000-0000-0000-0000-000000000000", + "imageType": "InvalidImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ], + "provisioningState": "Succeeded" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyDeployment1", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups/deployments", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/deployments/MyDeployment1" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json new file mode 100644 index 0000000000..85f53cd0d5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Delete.json @@ -0,0 +1,27 @@ +{ + "operationId": "Deployments_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeploymentName1", + "deviceGroupName": "DeviceGroupName1", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json new file mode 100644 index 0000000000..63a1b85466 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_Get.json @@ -0,0 +1,38 @@ +{ + "operationId": "Deployments_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deploymentName": "MyDeployment1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "description": "description", + "componentId": "componentId", + "image": "dGVzdGltYWdl", + "imageType": "ImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json new file mode 100644 index 0000000000..ad770c94f6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Deployments_ListByDeviceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "Deployments_ListByDeviceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Deployments_ListByDeviceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeployment1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/deviceGroups/MyDeviceGroup1/deployments/MyDeployment1", + "properties": { + "deployedImages": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/MyImage1", + "properties": { + "description": "description", + "componentId": "componentId", + "image": "dGVzdGltYWdl", + "imageType": "ImageType", + "provisioningState": "Succeeded", + "regionalDataBoundary": "None", + "uri": "imageUri" + } + } + ], + "deploymentDateUtc": "2022-09-30T21:51:39.2698729Z" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json new file mode 100644 index 0000000000..4b8d8dc27f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ClaimDevices.json @@ -0,0 +1,25 @@ +{ + "operationId": "DeviceGroups_ClaimDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "claimDevicesRequest": { + "deviceIdentifiers": [ + "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + ] + }, + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_ClaimDevices", + "responses": { + "202": { + "description": "Resource operation accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json new file mode 100644 index 0000000000..14b1a2758c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CountDevices.json @@ -0,0 +1,20 @@ +{ + "operationId": "DeviceGroups_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json new file mode 100644 index 0000000000..3244ad81aa --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_CreateOrUpdate.json @@ -0,0 +1,46 @@ +{ + "operationId": "DeviceGroups_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resource": { + "properties": { + "description": "Description for MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.AzureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "Description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyDeviceId1", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1", + "properties": { + "description": "Description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json new file mode 100644 index 0000000000..1c42b931ca --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Delete.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeviceGroups_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json new file mode 100644 index 0000000000..9b867336b3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Get.json @@ -0,0 +1,26 @@ +{ + "operationId": "DeviceGroups_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "The description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json new file mode 100644 index 0000000000..dc7a9bc1c4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_ListByProduct.json @@ -0,0 +1,30 @@ +{ + "operationId": "DeviceGroups_ListByProduct", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_ListByProduct", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1" + }, + { + "name": "MyDeviceGroup2", + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/Products/MyProduct2/devicegroups/MyDeviceGroup2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json new file mode 100644 index 0000000000..ae6b769484 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/DeviceGroups_Update.json @@ -0,0 +1,33 @@ +{ + "operationId": "DeviceGroups_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "DeviceGroups_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "The description of MyDeviceGroup1", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json new file mode 100644 index 0000000000..0361bfdd14 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Devices_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1" + } + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "Microsoft.AzureSphere/catalogs/products/deviceGroups/devices", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json new file mode 100644 index 0000000000..a1f3969be5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Delete.json @@ -0,0 +1,27 @@ +{ + "operationId": "Devices_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "DeviceGroupName1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json new file mode 100644 index 0000000000..c125e98e70 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_GenerateCapabilityImage.json @@ -0,0 +1,32 @@ +{ + "operationId": "Devices_GenerateCapabilityImage", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "generateDeviceCapabilityRequest": { + "capabilities": [ + "ApplicationDevelopment" + ] + }, + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_GenerateCapabilityImage", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "image": "TheDeviceCapabilityImage" + } + }, + "202": { + "description": "Resource operation accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json new file mode 100644 index 0000000000..a645c9e293 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Get.json @@ -0,0 +1,29 @@ +{ + "operationId": "Devices_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1", + "lastAvailableOsVersion": "AvailableOsVersion1", + "lastInstalledOsVersion": "InstalledOsVersion1", + "lastOsUpdateUtc": "2022-09-30T23:54:21.96Z", + "lastUpdateRequestUtc": "2022-10-01T23:54:21.96Z" + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json new file mode 100644 index 0000000000..fd2f8ca567 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_ListByDeviceGroup.json @@ -0,0 +1,29 @@ +{ + "operationId": "Devices_ListByDeviceGroup", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "myDeviceGroup1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_ListByDeviceGroup", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000001", + "properties": {} + }, + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/myProduct1/deviceGroups/myDeviceGroup1/devices/00000000-0000-0000-0000-000000000002", + "properties": {} + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json new file mode 100644 index 0000000000..309755fae6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Devices_Update.json @@ -0,0 +1,36 @@ +{ + "operationId": "Devices_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "deviceName": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Devices_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "Microsoft.AzureSphere/catalogs/products/devicegroups", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1/device/00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "properties": { + "chipSku": "MyChipSku1", + "lastAvailableOsVersion": "AvailableOsVersion1", + "lastInstalledOsVersion": "InstalledOsVersion1", + "lastOsUpdateUtc": "2022-10-30T23:54:21.96Z", + "lastUpdateRequestUtc": "2022-10-01T23:54:21.96Z" + } + } + }, + "202": { + "description": "The device update started successfully.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json new file mode 100644 index 0000000000..4afa2137a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_CreateOrUpdate.json @@ -0,0 +1,34 @@ +{ + "operationId": "Images_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "default", + "resource": { + "properties": { + "image": "bXliYXNlNjRzdHJpbmc=" + } + }, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Image_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/images", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/images", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/images/default" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json new file mode 100644 index 0000000000..8457e3ba33 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Delete.json @@ -0,0 +1,25 @@ +{ + "operationId": "Images_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "imageID", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json new file mode 100644 index 0000000000..e63b7d375c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_Get.json @@ -0,0 +1,17 @@ +{ + "operationId": "Images_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "imageName": "myImageId", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": {} + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json new file mode 100644 index 0000000000..c84863660c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Images_ListByCatalog.json @@ -0,0 +1,27 @@ +{ + "operationId": "Images_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Images_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyImage1", + "id": "00000000-0000-0000-0000-000000000001" + }, + { + "name": "MyImage2", + "id": "00000000-0000-0000-0000-000000000002" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json new file mode 100644 index 0000000000..74b9469a62 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CountDevices.json @@ -0,0 +1,21 @@ +{ + "operationId": "Products_CountDevices", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "deviceGroupName": "MyDeviceGroup1", + "productGroupName": "MyProduct1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_CountDevices", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": 3 + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json new file mode 100644 index 0000000000..cde11d3020 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_CreateOrUpdate.json @@ -0,0 +1,30 @@ +{ + "operationId": "Products_CreateOrUpdate", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resource": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_CreateOrUpdate", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "body": { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json new file mode 100644 index 0000000000..ce45bfdb5a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Delete.json @@ -0,0 +1,25 @@ +{ + "operationId": "Products_Delete", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProductName1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Delete", + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + }, + "204": { + "description": "Resource deleted successfully." + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json new file mode 100644 index 0000000000..6c834aff44 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_GenerateDefaultDeviceGroups.json @@ -0,0 +1,40 @@ +{ + "operationId": "Products_GenerateDefaultDeviceGroups", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_GenerateDefaultDeviceGroups", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyDeviceGroup1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup1", + "properties": { + "description": "Device group description 1", + "allowCrashDumpsCollection": "Enabled", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + }, + { + "name": "MyDeviceGroup2", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1/devicegroups/MyDeviceGroup2", + "properties": { + "description": "Device group description 2", + "allowCrashDumpsCollection": "Enabled", + "osFeedType": "Retail", + "updatePolicy": "UpdateAll" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json new file mode 100644 index 0000000000..8acc34e547 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Get.json @@ -0,0 +1,23 @@ +{ + "operationId": "Products_Get", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Get", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1", + "properties": { + "description": "product description." + } + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json new file mode 100644 index 0000000000..2bc3059d09 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_ListByCatalog.json @@ -0,0 +1,29 @@ +{ + "operationId": "Products_ListByCatalog", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_ListByCatalog", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "value": [ + { + "name": "MyProduct1", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1" + }, + { + "name": "MyProduct2", + "type": "Microsoft.AzureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct2" + } + ] + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json new file mode 100644 index 0000000000..cd7ea772c3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/examples/2022-09-01-preview/Products_Update.json @@ -0,0 +1,30 @@ +{ + "operationId": "Products_Update", + "parameters": { + "api-version": "2022-09-01-preview", + "catalogName": "MyCatalog1", + "productName": "MyProduct1", + "properties": {}, + "resourceGroupName": "MyResourceGroup1", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "title": "Products_Update", + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "body": { + "type": "microsoft.azureSphere/catalogs/products", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup1/providers/Microsoft.AzureSphere/catalogs/MyCatalog1/products/MyProduct1", + "properties": { + "description": "Product description." + } + } + }, + "202": { + "description": "Resource update request accepted.", + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp index 733c48e408..8af1897a6c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/main.tsp @@ -30,5 +30,6 @@ namespace Microsoft.AzureSphere; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-09-01-preview API version.") v2022_09_01_preview: "2022-09-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp index e24be0e9ac..2fa769a4e4 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-sphere/tsp-output/models.tsp @@ -6,21 +6,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.AzureSphere; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("Provisioning state of the resource.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -31,6 +35,7 @@ enum ProvisioningState { @doc("The resource create request has been accepted") Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -38,6 +43,7 @@ enum CreatedByType { Key, } +@doc("Certificate status values.") enum CertificateStatus { @doc("Certificate is active") Active, @doc("Certificate is inactive") Inactive, @@ -45,11 +51,13 @@ enum CertificateStatus { @doc("Certificate has been revoked") Revoked, } +@doc("Regional data boundary values.") enum RegionalDataBoundary { @doc("No data boundary") None, @doc("EU data boundary") EU, } +@doc("Image type values.") enum ImageType { @doc("Invalid image.") InvalidImageType, @doc("One Bl image type") OneBl, @@ -77,21 +85,25 @@ enum ImageType { @doc("Other image type") Other, } +@doc("OS feed type values.") enum OSFeedType { @doc("Retail OS feed type.") Retail, @doc("Retail evaluation OS feed type.") RetailEval, } +@doc("Update policy values.") enum UpdatePolicy { @doc("Update all policy.") UpdateAll, @doc("No update for 3rd party app policy.") No3rdPartyAppUpdates, } +@doc("Allow crash dumps values.") enum AllowCrashDumpCollection { @doc("Crash dump collection enabled") Enabled, @doc("Crash dump collection disabled") Disabled, } +@doc("Capability image type") enum CapabilityType { @doc("Application development capability") ApplicationDevelopment, @doc("Field servicing capability") FieldServicing, @@ -104,6 +116,31 @@ model CatalogProperties { provisioningState?: ProvisioningState; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Catalog.") +model CatalogUpdate { + @doc("Resource tags.") + tags?: Record; +} + @doc("The properties of certificate") model CertificateProperties { @doc("The certificate as a UTF-8 encoded base 64 string.") @@ -328,12 +365,60 @@ model ProductProperties { provisioningState?: ProvisioningState; } +@doc("The type used for update operations of the Product.") +model ProductUpdate { + @doc("The updatable properties of the Product.") + properties?: ProductUpdateProperties; +} + +@doc("The updatable properties of the Product.") +model ProductUpdateProperties { + @doc("Description of the product") + description?: string; +} + +@doc("The type used for update operations of the DeviceGroup.") +model DeviceGroupUpdate { + @doc("The updatable properties of the DeviceGroup.") + properties?: DeviceGroupUpdateProperties; +} + +@doc("The updatable properties of the DeviceGroup.") +model DeviceGroupUpdateProperties { + @doc("Description of the device group.") + description?: string; + + @doc("Operating system feed type of the device group.") + osFeedType?: OSFeedType; + + @doc("Update policy of the device group.") + updatePolicy?: UpdatePolicy; + + @doc("Flag to define if the user allows for crash dump collection.") + allowCrashDumpsCollection?: AllowCrashDumpCollection; + + @doc("Regional data boundary for the device group.") + regionalDataBoundary?: RegionalDataBoundary; +} + @doc("Request to the action call to bulk claim devices.") model ClaimDevicesRequest { @doc("Device identifiers of the devices to be claimed.") deviceIdentifiers: string[]; } +@doc("The type used for update operations of the Device.") +model DeviceUpdate { + @doc("The updatable properties of the Device.") + properties?: DeviceUpdateProperties; +} + +@doc("The updatable properties of the Device.") +model DeviceUpdateProperties { + @doc("Device group id") + deviceGroupId?: string; +} + @doc("Request of the action to create a signed device capability image") model GenerateCapabilityImageRequest { @doc("List of capabilities to create") diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp index b6f9b121f9..6df53af1cd 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobContainer.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./BlobServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Properties of the blob container, including Id, resource name, resource type, Etag.") @@ -26,12 +28,16 @@ model BlobContainer is ProxyResource { interface BlobContainers { @doc("Gets properties of a specified container. ") get is ArmResourceRead; + @doc("Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. ") create is ArmResourceCreateOrReplaceSync; + @doc("Updates container properties as specified in request body. Properties not mentioned in the request will be unchanged. Update fails if the specified container doesn't already exist. ") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Deletes specified container under its account.") delete is ArmResourceDeleteSync; + @doc("Lists all containers and does not support a prefix like data plane. Also SRP today does not return continuation token.") list is ArmResourceListByParent< BlobContainer, @@ -51,16 +57,26 @@ interface BlobContainers { $include?: ListContainersInclude; } >; + @doc("Sets legal hold tags. Setting the same tag results in an idempotent operation. SetLegalHold follows an append pattern and does not clear out the existing tags that are not specified in the request.") setLegalHold is ArmResourceActionSync; + @doc("Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.") clearLegalHold is ArmResourceActionSync; + @doc("The Lease Container operation establishes and manages a lock on a container for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") lease is ArmResourceActionSync< BlobContainer, LeaseContainerRequest, LeaseContainerResponse >; + @doc("This operation migrates a blob container from container level WORM to object level immutability enabled container. Prerequisites require a container level immutability policy either in locked or unlocked state, Account level versioning must be enabled and there should be no Legal hold on the container.") - objectLevelWorm is ArmResourceActionAsync; + objectLevelWorm is ArmResourceActionAsync< + BlobContainer, + void, + void, + BaseParameters, + ArmLroLocationHeader + >; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp index fff3f9de56..6e95e0e636 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobInventoryPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The storage account blob inventory policy.") @singleton("default") @parentResource(StorageAccount) model BlobInventoryPolicy is ProxyResource { - @key("blobInventoryPolicyName") + @key("inventoryPolicy") @segment("inventoryPolicies") name: string; } @@ -23,10 +25,13 @@ model BlobInventoryPolicy is ProxyResource { interface BlobInventoryPolicies { @doc("Gets the blob inventory policy associated with the specified storage account.") get is ArmResourceRead; + @doc("Sets the blob inventory policy to the specified storage account.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the blob inventory policy associated with the specified storage account.") delete is ArmResourceDeleteSync; + @doc("Gets the blob inventory policy associated with the specified storage account.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp index a67250d6a2..2848b6cbd9 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/BlobServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of a storage account’s Blob service.") @singleton("default") @parentResource(StorageAccount) model BlobServiceProperties is ProxyResource { - @key("BlobServicesName") + @key("blobService") @segment("blobServices") name: string; @@ -22,29 +24,20 @@ model BlobServiceProperties is ProxyResource { } @armResourceOperations -interface BlobServices { +@projectedName("client", "BlobServiceProperties") +interface BlobServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - BlobServiceProperties, - { - ...BaseParameters; + @operationId("BlobServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the blob Service within the specified storage account. Blob Service Name must be 'default'") - @path - BlobServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - BlobServiceProperties, - { - ...BaseParameters; + @operationId("BlobServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the blob Service within the specified storage account. Blob Service Name must be 'default'") - @path - BlobServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List blob services of storage account. It returns a collection of one object named default.") + @operationId("BlobServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp index e190019d6d..6c449cf914 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/DeletedAccount.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Deleted storage account") @@ -25,6 +27,7 @@ model DeletedAccount is ProxyResource { interface DeletedAccounts { @doc("Get properties of specified deleted account resource.") get is ArmResourceRead; + @doc("Lists deleted accounts under the subscription.") list is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp index 320165cc47..9dabc70a47 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/EncryptionScope.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The Encryption Scope resource.") @@ -26,10 +28,13 @@ model EncryptionScope is ProxyResource { interface EncryptionScopes { @doc("Returns the properties for the specified encryption scope.") get is ArmResourceRead; + @doc("Synchronously creates or updates an encryption scope under the specified storage account. If an encryption scope is already created and a subsequent request is issued with different properties, the encryption scope properties will be updated per the specified request.") put is ArmResourceCreateOrReplaceSync; + @doc("Update encryption scope properties as specified in the request body. Update fails if the specified encryption scope does not already exist.") - patch is ArmResourcePatchSync; + patch is ArmCustomPatchSync; + @doc("Lists all the encryption scopes available under the specified storage account.") list is ArmResourceListByParent< EncryptionScope, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp index 710c8ec88d..36971e998c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of File services in storage account.") @singleton("default") @parentResource(StorageAccount) model FileServiceProperties is ProxyResource { - @key("FileServicesName") + @key("fileService") @segment("fileServices") name: string; @@ -22,29 +24,20 @@ model FileServiceProperties is ProxyResource { } @armResourceOperations -interface FileServices { +@projectedName("client", "FileServiceProperties") +interface FileServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - FileServiceProperties, - { - ...BaseParameters; + @operationId("FileServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the file Service within the specified storage account. File Service Name must be \"default\"") - @path - FileServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of file services in storage accounts, including CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - FileServiceProperties, - { - ...BaseParameters; + @operationId("FileServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the file Service within the specified storage account. File Service Name must be \"default\"") - @path - FileServicesName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all file services in storage accounts") + @operationId("FileServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp index c48d1e79ac..3a9ee48c75 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/FileShare.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./FileServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Properties of the file share, including Id, resource name, resource type, Etag.") @@ -39,6 +41,7 @@ interface FileShares { `x-ms-snapshot`?: string; } >; + @doc("Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. ") create is ArmResourceCreateOrReplaceSync< FileShare, @@ -50,8 +53,10 @@ interface FileShares { $expand?: string; } >; + @doc("Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. ") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Deletes specified share under its account.") delete is ArmResourceDeleteSync< FileShare, @@ -67,6 +72,7 @@ interface FileShares { $include?: string; } >; + @doc("Lists all shares.") list is ArmResourceListByParent< FileShare, @@ -86,8 +92,10 @@ interface FileShares { $expand?: string; } >; + @doc("Restore a file share within a valid retention days if share soft delete is enabled") restore is ArmResourceActionSync; + @doc("The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.") lease is ArmResourceActionSync< FileShare, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp index 5711f42a29..7cf2002c83 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ImmutabilityPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./BlobContainer.tsp"; @@ -8,65 +9,65 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The ImmutabilityPolicy property of a blob container, including Id, resource name, resource type, Etag.") @singleton("default") @parentResource(BlobContainer) model ImmutabilityPolicy is ProxyResource { - @key("immutabilityPolicyName") + @key("immutabilityPolicy") @segment("immutabilityPolicies") name: string; } @armResourceOperations -interface BlobContainers { +interface ImmutabilityPolicies { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the existing immutability policy along with the corresponding ETag in response headers and body.") + @operationId("BlobContainers_GetImmutabilityPolicy") getImmutabilityPolicy is ArmResourceRead< ImmutabilityPolicy, { ...BaseParameters; - @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") - @path - immutabilityPolicyName: "default"; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") @header `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates or updates an unlocked immutability policy. ETag in If-Match is honored if given but not required for this operation.") + @operationId("BlobContainers_CreateOrUpdateImmutabilityPolicy") createOrUpdateImmutabilityPolicy is ArmResourceCreateOrReplaceSync< ImmutabilityPolicy, { ...BaseParameters; - @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") - @path - immutabilityPolicyName: "default"; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") @header `If-Match`?: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Aborts an unlocked immutability policy. The response of delete has immutabilityPeriodSinceCreationInDays set to 0. ETag in If-Match is required for this operation. Deleting a locked immutability policy is not allowed, the only way is to delete the container after deleting all expired blobs inside the policy locked container.") + @operationId("BlobContainers_DeleteImmutabilityPolicy") deleteImmutabilityPolicy is ArmResourceDeleteSync< ImmutabilityPolicy, { ...BaseParameters; - @doc("The name of the blob container immutabilityPolicy within the specified storage account. ImmutabilityPolicy Name must be 'default'") - @path - immutabilityPolicyName: "default"; - @doc("The entity state (ETag) version of the immutability policy to update. A value of \"*\" can be used to apply the operation only if the immutability policy already exists. If omitted, this operation will always be applied.") @header `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the ImmutabilityPolicy to Locked state. The only action allowed on a Locked policy is ExtendImmutabilityPolicy action. ETag in If-Match is required for this operation.") + @operationId("BlobContainers_LockImmutabilityPolicy") lockImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, void, @@ -79,7 +80,10 @@ interface BlobContainers { `If-Match`: string; } >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Extends the immutabilityPeriodSinceCreationInDays of a locked immutabilityPolicy. The only action allowed on a Locked policy will be this action. ETag in If-Match is required for this operation.") + @operationId("BlobContainers_ExtendImmutabilityPolicy") extendImmutabilityPolicy is ArmResourceActionSync< ImmutabilityPolicy, ImmutabilityPolicy, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp index 4ff5277129..f8d802d842 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/LocalUser.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The local user associated with the storage accounts.") @@ -26,14 +28,19 @@ model LocalUser is ProxyResource { interface LocalUsers { @doc("Get the local user of the storage account by username.") get is ArmResourceRead; + @doc("Create or update the properties of a local user associated with the storage account") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the local user associated with the specified storage account.") delete is ArmResourceDeleteSync; + @doc("List the local users associated with the storage account.") list is ArmResourceListByParent; + @doc("List SSH authorized keys and shared key of the local user.") listKeys is ArmResourceActionSync; + @doc("Regenerate the local user SSH password.") regeneratePassword is ArmResourceActionSync< LocalUser, diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp index e0cb0cd055..40823cbcc8 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ManagementPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The Get Storage Account ManagementPolicies operation response.") @singleton("default") @parentResource(StorageAccount) model ManagementPolicy is ProxyResource { - @key("managementPolicyName") + @key("managementPolicy") @segment("managementPolicies") name: string; } @@ -23,8 +25,10 @@ model ManagementPolicy is ProxyResource { interface ManagementPolicies { @doc("Gets the managementpolicy associated with the specified storage account.") get is ArmResourceRead; + @doc("Sets the managementpolicy to the specified storage account.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the managementpolicy associated with the specified storage account.") delete is ArmResourceDeleteSync; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp index ec1f4f6b41..a78d6c77d7 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/ObjectReplicationPolicy.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The replication policy between two storage accounts. Multiple rules can be defined in one policy.") @@ -26,10 +28,13 @@ model ObjectReplicationPolicy interface ObjectReplicationPolicies { @doc("Get the object replication policy of the storage account by policy ID.") get is ArmResourceRead; + @doc("Create or update the object replication policy of the storage account.") createOrUpdate is ArmResourceCreateOrReplaceSync; + @doc("Deletes the object replication policy associated with the specified storage account.") delete is ArmResourceDeleteSync; + @doc("List the object replication policies associated with the storage account.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp index 3e4c66ead9..98b1c03ab2 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/PrivateEndpointConnection.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The Private Endpoint Connection resource.") @@ -25,10 +27,13 @@ model PrivateEndpointConnection interface PrivateEndpointConnections { @doc("Gets the specified private endpoint connection associated with the storage account.") get is ArmResourceRead; + @doc("Update the state of specified private endpoint connection associated with the storage account.") put is ArmResourceCreateOrReplaceSync; + @doc("Deletes the specified private endpoint connection associated with the storage account.") delete is ArmResourceDeleteSync; + @doc("List all the private endpoint connections associated with the storage account.") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp index ad95b89e19..afbb38a879 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/QueueServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of a storage account’s Queue service.") @@ -15,35 +17,26 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) model QueueServiceProperties is ProxyResource { - @key("queueServiceName") + @key("queueService") @segment("queueServices") name: string; } @armResourceOperations -interface QueueServices { +@projectedName("client", "QueueServiceProperties") +interface QueueServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - QueueServiceProperties, - { - ...BaseParameters; + @operationId("QueueServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the Queue Service within the specified storage account. Queue Service Name must be 'default'") - @path - queueServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of a storage account’s Queue service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - QueueServiceProperties, - { - ...BaseParameters; + @operationId("QueueServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the Queue Service within the specified storage account. Queue Service Name must be 'default'") - @path - queueServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all queue services for the storage account") + @operationId("QueueServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp index d632fe5991..4ce10f0a6b 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageAccount.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The storage account.") @@ -40,16 +42,22 @@ interface StorageAccounts { $expand?: StorageAccountExpand; } >; + @doc("Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact same set of properties, the request will succeed.") create is ArmResourceCreateOrUpdateAsync; + @doc("The update operation can be used to update the SKU, encryption, access tier, or tags for a storage account. It can also be used to map the account to a custom domain. Only one custom domain is supported per storage account; the replacement/change of custom domain is not supported. In order to replace an old custom domain, the old value must be cleared/unregistered before a new value can be set. The update of multiple properties is supported. This call does not change the storage keys for the account. If you want to change the storage account keys, use the regenerate keys operation. The location and name of the storage account cannot be changed after creation.") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Deletes a storage account in Microsoft Azure.") delete is ArmResourceDeleteSync; + @doc("Lists all the storage accounts available under the given resource group. Note that storage keys are not returned; use the ListKeys operation for this.") listByResourceGroup is ArmResourceListByParent; + @doc("Lists all the storage accounts available under the subscription. Note that storage keys are not returned; use the ListKeys operation for this.") list is ArmListBySubscription; + @doc("Lists the access keys or Kerberos keys (if active directory enabled) for the specified storage account.") listKeys is ArmResourceActionSync< StorageAccount, @@ -63,24 +71,32 @@ interface StorageAccounts { $expand?: "kerb"; } >; + @doc("Regenerates one of the access keys or Kerberos keys for the specified storage account.") regenerateKey is ArmResourceActionSync< StorageAccount, StorageAccountRegenerateKeyParameters, StorageAccountListKeysResult >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List SAS credentials of a storage account.") + @operationId("StorageAccounts_ListAccountSAS") listAccountSAS is ArmResourceActionSync< StorageAccount, AccountSasParameters, ListAccountSasResponse >; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List service SAS credentials of a specific resource.") + @operationId("StorageAccounts_ListServiceSAS") listServiceSAS is ArmResourceActionSync< StorageAccount, ServiceSasParameters, ListServiceSasResponse >; + @doc("A failover request can be triggered for a storage account in the event a primary endpoint becomes unavailable for any reason. The failover occurs from the storage account's primary cluster to the secondary cluster for RA-GRS accounts. The secondary cluster will become primary after failover and the account is converted to LRS. In the case of a Planned Failover, the primary and secondary clusters are swapped after failover and the account remains geo-replicated. Failover should continue to be used in the event of availability issues as Planned failover is only available while the primary and secondary endpoints are available. The primary use case of a Planned Failover is disaster recovery testing drills. This type of failover is invoked by setting FailoverType parameter to 'Planned'. Learn more about the failover options here- https://learn.microsoft.com/en-us/azure/storage/common/storage-disaster-recovery-guidance") failover is ArmResourceActionAsync< StorageAccount, @@ -92,8 +108,10 @@ interface StorageAccounts { @doc("The parameter is set to 'Planned' to indicate whether a Planned failover is requested.") @query("failoverType") failoverType?: "Planned"; - } + }, + ArmLroLocationHeader >; + @doc("Live Migration of storage account to enable Hns") hierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, @@ -105,27 +123,38 @@ interface StorageAccounts { @doc("Required. Hierarchical namespace migration type can either be a hierarchical namespace validation request 'HnsOnValidationRequest' or a hydration request 'HnsOnHydrationRequest'. The validation request will validate the migration whereas the hydration request will migrate the account.") @query("requestType") requestType: string; - } + }, + ArmLroLocationHeader >; + @doc("Abort live Migration of storage account to enable Hns") abortHierarchicalNamespaceMigration is ArmResourceActionAsync< StorageAccount, void, - void + void, + BaseParameters, + ArmLroLocationHeader >; + @doc("Restore blobs in the specified blob ranges") restoreBlobRanges is ArmResourceActionAsync< StorageAccount, BlobRestoreParameters, - BlobRestoreStatus + BlobRestoreStatus, + BaseParameters, + ArmLroLocationHeader >; + @doc("Revoke user delegation keys.") revokeUserDelegationKeys is ArmResourceActionSync; -} -@armResourceOperations -interface PrivateLinkResources { + @doc("Checks that the storage account name is valid and is not already in use.") + checkNameAvailability is checkGlobalNameAvailability; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" + @operationId("PrivateLinkResources_ListByStorageAccount") @doc("Gets the private link resources that need to be created for a storage account.") + // FIXME: PrivateLinkResources_ListByStorageAccount could not be converted to a resource operation @route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/privateLinkResources") @get ListByStorageAccount is Azure.Core.Foundations.Operation< diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp index 0045150490..e7ac5dea0d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/StorageQueue.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./QueueServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @@ -24,16 +26,30 @@ model StorageQueue is ProxyResource { } @armResourceOperations -interface Queue { +interface StorageQueues { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the queue with the specified queue name, under the specified account if it exists.") + @operationId("Queue_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new queue with the specified queue name, under the specified account.") + @operationId("Queue_Create") create is ArmResourceCreateOrReplaceSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new queue with the specified queue name, under the specified account.") - update is ArmResourcePatchSync; + @operationId("Queue_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the queue with the specified queue name, under the specified account if it exists.") + @operationId("Queue_Delete") delete is ArmResourceDeleteSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all the queues under the specified storage account") + @operationId("Queue_List") list is ArmResourceListByParent< StorageQueue, { diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp index 5857bcd0ad..871fdcff9f 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/Table.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./TableServiceProperties.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("Properties of the table, including Id, resource name, resource type.") @@ -24,15 +26,29 @@ model Table is ProxyResource { } @armResourceOperations -interface Table { +interface Tables { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the table with the specified table name, under the specified account if it exists.") + @operationId("Table_Get") get is ArmResourceRead; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new table with the specified table name, under the specified account.") + @operationId("Table_Create") create is ArmResourceCreateOrReplaceSync
; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Creates a new table with the specified table name, under the specified account.") - update is ArmResourcePatchSync; + @operationId("Table_Update") + update is ArmCustomPatchSync; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Deletes the table with the specified table name, under the specified account if it exists.") + @operationId("Table_Delete") delete is ArmResourceDeleteSync
; + + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets a list of all the tables under the specified storage account") + @operationId("Table_List") list is ArmResourceListByParent
; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp index 71206769e9..99fbd3e7e5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/TableServiceProperties.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./StorageAccount.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Storage; @doc("The properties of a storage account’s Table service.") @@ -15,35 +17,26 @@ namespace Microsoft.Storage; @parentResource(StorageAccount) model TableServiceProperties is ProxyResource { - @key("tableServiceName") + @key("tableService") @segment("tableServices") name: string; } @armResourceOperations -interface TableServices { +@projectedName("client", "TableServiceProperties") +interface TableServicePropertiesOperationGroup { + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Gets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.") - getServiceProperties is ArmResourceRead< - TableServiceProperties, - { - ...BaseParameters; + @operationId("TableServices_GetServiceProperties") + getServiceProperties is ArmResourceRead; - @doc("The name of the Table Service within the specified storage account. Table Service Name must be 'default'") - @path - tableServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("Sets the properties of a storage account’s Table service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. ") - setServiceProperties is ArmResourceCreateOrReplaceSync< - TableServiceProperties, - { - ...BaseParameters; + @operationId("TableServices_SetServiceProperties") + setServiceProperties is ArmResourceCreateOrReplaceSync; - @doc("The name of the Table Service within the specified storage account. Table Service Name must be 'default'") - @path - tableServiceName: "default"; - } - >; + #suppress "@azure-tools/typespec-azure-core/no-operation-id" "For backward compatibility" @doc("List all table services for the storage account.") + @operationId("TableServices_List") list is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json new file mode 100644 index 0000000000..c638ce3ac6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ClearLegalHold.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "LegalHold": { + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "hasLegalHold": false, + "tags": [] + } + } + }, + "operationId": "BlobContainers_ClearLegalHold", + "title": "ClearLegalHoldContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json new file mode 100644 index 0000000000..65599a78ab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicy.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "parameters": { + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 3 + } + }, + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f830cb130e5\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "title": "CreateOrUpdateImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json new file mode 100644 index 0000000000..a55b6a1ae9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_CreateOrUpdateImmutabilityPolicy_CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "parameters": { + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3 + } + }, + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f830cb130e5\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1782/providers/Microsoft.Storage/storageAccounts/sto7069/blobServices/default/containers/container6397/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_CreateOrUpdateImmutabilityPolicy", + "title": "CreateOrUpdateImmutabilityPolicyWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json new file mode 100644 index 0000000000..a90643cf61 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithDefaultEncryptionScope.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "defaultEncryptionScope": "encryptionscope185", + "denyEncryptionScopeOverride": true + } + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainerWithDefaultEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json new file mode 100644 index 0000000000..d59b2625c1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainerWithObjectLevelWorm.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true + } + } + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainerWithObjectLevelWorm" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json new file mode 100644 index 0000000000..d2610bb08d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Create_PutContainers.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": {}, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185" + } + }, + "201": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185" + } + } + }, + "operationId": "BlobContainers_Create", + "title": "PutContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json new file mode 100644 index 0000000000..0606f341a8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto4506", + "api-version": "2022-09-01", + "containerName": "container9689", + "monitor": "true", + "resourceGroupName": "res4079", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "BlobContainers_Delete", + "title": "DeleteContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json new file mode 100644 index 0000000000..d19ff5f137 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_DeleteImmutabilityPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "If-Match": "\"8d59f81a7fa7be0\"", + "accountName": "sto9621", + "api-version": "2022-09-01", + "containerName": "container4910", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res1581", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f81a87b40c0\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res1581/providers/Microsoft.Storage/storageAccounts/sto9621/blobServices/default/containers/container4910/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 0, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_DeleteImmutabilityPolicy", + "title": "DeleteImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json new file mode 100644 index 0000000000..f19de1db20 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ExtendImmutabilityPolicy.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "If-Match": "\"8d59f830d0c3bf9\"", + "accountName": "sto232", + "api-version": "2022-09-01", + "containerName": "container5023", + "monitor": "true", + "parameters": { + "properties": { + "immutabilityPeriodSinceCreationInDays": 100 + } + }, + "resourceGroupName": "res6238", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d57a8b2ff50332\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6238/providers/Microsoft.Storage/storageAccounts/sto232/blobServices/default/containers/container5023/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + } + } + } + }, + "operationId": "BlobContainers_ExtendImmutabilityPolicy", + "title": "ExtendImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json new file mode 100644 index 0000000000..25315997db --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_GetImmutabilityPolicy.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "accountName": "sto9177", + "api-version": "2022-09-01", + "containerName": "container3489", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res5221", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d59f828e64b75c\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res5221/providers/Microsoft.Storage/storageAccounts/sto9177/blobServices/default/containers/container3489/immutabilityPolicies/default", + "properties": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 5, + "state": "Unlocked" + } + } + } + }, + "operationId": "BlobContainers_GetImmutabilityPolicy", + "title": "GetImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json new file mode 100644 index 0000000000..5536afa47e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetBlobContainersGetWithAllowProtectedAppendWritesAll.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "containerName": "container1634", + "monitor": "true", + "resourceGroupName": "res9871", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container1634", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634", + "properties": { + "hasImmutabilityPolicy": true, + "hasLegalHold": true, + "immutabilityPolicy": { + "etag": "\"8d592d74cb3011a\"", + "properties": { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + }, + "updateHistory": [ + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:11.431403Z", + "update": "put" + }, + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:13.0907641Z", + "update": "lock" + }, + { + "allowProtectedAppendWritesAll": true, + "immutabilityPeriodSinceCreationInDays": 100, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:14.7097716Z", + "update": "extend" + } + ] + }, + "lastModifiedTime": "2018-03-26T05:06:14Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "legalHold": { + "hasLegalHold": true, + "protectedAppendWritesHistory": { + "allowProtectedAppendWritesAll": true, + "timestamp": "2022-09-01T01:58:44.5044483Z" + }, + "tags": [ + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag1", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag2", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag3", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + } + ] + }, + "publicAccess": "None" + } + } + } + }, + "operationId": "BlobContainers_Get", + "title": "GetBlobContainersGetWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json new file mode 100644 index 0000000000..11f4fda9ba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Get_GetContainers.json @@ -0,0 +1,83 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "containerName": "container1634", + "monitor": "true", + "resourceGroupName": "res9871", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container1634", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/blobServices/default/containers/container1634", + "properties": { + "hasImmutabilityPolicy": true, + "hasLegalHold": true, + "immutabilityPolicy": { + "etag": "\"8d592d74cb3011a\"", + "properties": { + "immutabilityPeriodSinceCreationInDays": 100, + "state": "Locked" + }, + "updateHistory": [ + { + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:11.431403Z", + "update": "put" + }, + { + "immutabilityPeriodSinceCreationInDays": 3, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:13.0907641Z", + "update": "lock" + }, + { + "immutabilityPeriodSinceCreationInDays": 100, + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:14.7097716Z", + "update": "extend" + } + ] + }, + "lastModifiedTime": "2018-03-26T05:06:14Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "legalHold": { + "hasLegalHold": true, + "tags": [ + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag1", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag2", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + }, + { + "objectIdentifier": "ce7cd28a-fc25-4bf1-8fb9-e1b9833ffd4b", + "tag": "tag3", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "timestamp": "2018-03-26T05:06:09.6964643Z" + } + ] + }, + "publicAccess": "None" + } + } + } + }, + "operationId": "BlobContainers_Get", + "title": "GetContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json new file mode 100644 index 0000000000..3106c569b5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_AcquireALeaseOnAContainer.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "containerName": "container6185", + "monitor": "true", + "parameters": { + "action": "Acquire", + "breakPeriod": null, + "leaseDuration": -1, + "leaseId": null, + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d" + } + } + }, + "operationId": "BlobContainers_Lease", + "title": "Acquire a lease on a container" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json new file mode 100644 index 0000000000..a0c851249b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Lease_BreakALeaseOnAContainer.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "containerName": "container6185", + "monitor": "true", + "parameters": { + "action": "Break", + "breakPeriod": null, + "leaseDuration": null, + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d", + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseTimeSeconds": "0" + } + } + }, + "operationId": "BlobContainers_Lease", + "title": "Break a lease on a container" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json new file mode 100644 index 0000000000..63b8c941ee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListContainers.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/container5103", + "value": [ + { + "name": "container1644", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "Container" + } + }, + { + "name": "container4052", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "None" + } + } + ] + } + } + }, + "operationId": "BlobContainers_List", + "title": "ListContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json new file mode 100644 index 0000000000..b0a7775fb5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_List_ListDeletedContainers.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "$include": "deleted", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "container1644", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container1644", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Available", + "leaseStatus": "Unlocked", + "publicAccess": "Container" + } + }, + { + "name": "container4052", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/blobServices/default/containers/container4052", + "properties": { + "deleted": true, + "deletedTime": "2019-12-14T08:20:47Z", + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "lastModifiedTime": "2018-03-14T08:20:47Z", + "leaseState": "Expired", + "leaseStatus": "Unlocked", + "publicAccess": "None", + "remainingRetentionDays": 30, + "version": "1234567890" + } + } + ] + } + } + }, + "operationId": "BlobContainers_List", + "title": "ListDeletedContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json new file mode 100644 index 0000000000..93507534cf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_LockImmutabilityPolicy.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "If-Match": "\"8d59f825b721dd3\"", + "accountName": "sto5009", + "api-version": "2022-09-01", + "containerName": "container1631", + "monitor": "true", + "resourceGroupName": "res2702", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers/immutabilityPolicies", + "etag": "\"8d57a8a5edb084a\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res2702/providers/Microsoft.Storage/storageAccounts/sto5009/blobServices/default/containers/container1631/immutabilityPolicies/default", + "properties": { + "immutabilityPeriodSinceCreationInDays": 3, + "state": "Locked" + } + } + } + }, + "operationId": "BlobContainers_LockImmutabilityPolicy", + "title": "LockImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json new file mode 100644 index 0000000000..39f5617c04 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_ObjectLevelWorm.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "accountName": "sto7069", + "api-version": "2022-09-01", + "containerName": "container6397", + "immutabilityPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res1782", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "BlobContainers_ObjectLevelWorm", + "title": "VersionLevelWormContainerMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json new file mode 100644 index 0000000000..384e5ab194 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainers.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "LegalHold": { + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "hasLegalHold": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + } + } + }, + "operationId": "BlobContainers_SetLegalHold", + "title": "SetLegalHoldContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json new file mode 100644 index 0000000000..0c3cebc312 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_SetLegalHold_SetLegalHoldContainersWithAllowProtectedAppendWritesAll.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "LegalHold": { + "allowProtectedAppendWritesAll": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + }, + "accountName": "sto7280", + "api-version": "2022-09-01", + "containerName": "container8723", + "monitor": "true", + "resourceGroupName": "res4303", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "allowProtectedAppendWritesAll": true, + "hasLegalHold": true, + "tags": [ + "tag1", + "tag2", + "tag3" + ] + } + } + }, + "operationId": "BlobContainers_SetLegalHold", + "title": "SetLegalHoldContainersWithAllowProtectedAppendWritesAll" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json new file mode 100644 index 0000000000..1aa042f28e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobContainers_Update.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "blobContainer": { + "properties": { + "metadata": { + "metadata": "true" + }, + "publicAccess": "Container" + } + }, + "containerName": "container6185", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "container6185", + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/blobServices/default/containers/container6185", + "properties": { + "hasImmutabilityPolicy": false, + "hasLegalHold": false, + "metadata": { + "metadata": "true" + }, + "publicAccess": "Container" + } + } + } + }, + "operationId": "BlobContainers_Update", + "title": "UpdateContainers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json new file mode 100644 index 0000000000..b3f356898c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicy.json @@ -0,0 +1,164 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json new file mode 100644 index 0000000000..1809e23c2e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount.json @@ -0,0 +1,199 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "DeletionId", + "Deleted", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "DeletionId", + "Deleted", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForHnsAccount" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json new file mode 100644 index 0000000000..ea3e4c1d20 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_CreateOrUpdate_StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount.json @@ -0,0 +1,197 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Tags", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "Deleted", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "excludePrefix": [ + "excludeprefix1", + "excludeprefix2" + ], + "includeBlobVersions": true, + "includeDeleted": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Tags", + "ContentType", + "ContentEncoding", + "ContentLanguage", + "ContentCRC64", + "CacheControl", + "Metadata", + "Deleted", + "RemainingRetentionDays" + ] + }, + "destination": "container1", + "enabled": true + }, + { + "name": "inventoryPolicyRule2", + "definition": { + "format": "Parquet", + "objectType": "Container", + "schedule": "Weekly", + "schemaFields": [ + "Name", + "Last-Modified", + "Metadata", + "LeaseStatus", + "LeaseState", + "LeaseDuration", + "PublicAccess", + "HasImmutabilityPolicy", + "HasLegalHold", + "Etag", + "DefaultEncryptionScope", + "DenyEncryptionScopeOverride", + "ImmutableStorageWithVersioningEnabled", + "Deleted", + "Version", + "DeletedTime", + "RemainingRetentionDays" + ] + }, + "destination": "container2", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_CreateOrUpdate", + "title": "StorageAccountSetBlobInventoryPolicyIncludeDeleteAndNewSchemaForNonHnsAccount" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json new file mode 100644 index 0000000000..74b346b837 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "BlobInventoryPolicies_Delete", + "title": "StorageAccountDeleteBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json new file mode 100644 index 0000000000..bfce403b0a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_Get.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "blobInventoryPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "BlobInventoryPolicies_Get", + "title": "StorageAccountGetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json new file mode 100644 index 0000000000..f83ea442d0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobInventoryPolicies_List.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "DefaultInventoryPolicy", + "type": "Microsoft.Storage/storageAccounts/inventoryPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/sto9699/inventoryPolicies/default", + "properties": { + "lastModifiedTime": "2020-10-05T02:53:39.0932539Z", + "policy": { + "type": "Inventory", + "enabled": true, + "rules": [ + { + "name": "inventoryPolicyRule1", + "definition": { + "format": "Csv", + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob", + "pageBlob" + ], + "includeBlobVersions": true, + "includeSnapshots": true, + "prefixMatch": [ + "inventoryprefix1", + "inventoryprefix2" + ] + }, + "objectType": "Blob", + "schedule": "Daily", + "schemaFields": [ + "Name", + "Creation-Time", + "Last-Modified", + "Content-Length", + "Content-MD5", + "BlobType", + "AccessTier", + "AccessTierChangeTime", + "Snapshot", + "VersionId", + "IsCurrentVersion", + "Metadata" + ] + }, + "destination": "container1", + "enabled": true + } + ] + } + } + } + ] + } + } + }, + "operationId": "BlobInventoryPolicies_List", + "title": "StorageAccountGetBlobInventoryPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json new file mode 100644 index 0000000000..1bdaf78877 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_GetServiceProperties.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "BlobServices_GetServiceProperties", + "title": "GetBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json new file mode 100644 index 0000000000..cb61fc99a4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_List.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "BlobServices_List", + "title": "ListBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json new file mode 100644 index 0000000000..2ee78d0f22 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutAllowPermanentDelete.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "deleteRetentionPolicy": { + "allowPermanentDelete": true, + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "deleteRetentionPolicy": { + "allowPermanentDelete": true, + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "BlobServicesPutAllowPermanentDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json new file mode 100644 index 0000000000..7adcadf650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_BlobServicesPutLastAccessTimeBasedTracking.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "lastAccessTimeTrackingPolicy": { + "name": "AccessTimeTracking", + "blobType": [ + "blockBlob" + ], + "enable": true, + "trackingGranularityInDays": 1 + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "lastAccessTimeTrackingPolicy": { + "name": "AccessTimeTracking", + "blobType": [ + "blockBlob" + ], + "enable": true, + "trackingGranularityInDays": 1 + } + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "BlobServicesPutLastAccessTimeBasedTracking" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json new file mode 100644 index 0000000000..719ad7be35 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/BlobServices_SetServiceProperties_PutBlobServices.json @@ -0,0 +1,173 @@ +{ + "parameters": { + "BlobServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/blobServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default", + "properties": { + "changeFeed": { + "enabled": true, + "retentionInDays": 7 + }, + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x -ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + }, + "defaultServiceVersion": "2017-07-29", + "deleteRetentionPolicy": { + "days": 300, + "enabled": true + }, + "isVersioningEnabled": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "BlobServices_SetServiceProperties", + "title": "PutBlobServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json new file mode 100644 index 0000000000..1ad68565be --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "deletedAccountName": "sto1125", + "location": "eastus", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto1125", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125", + "properties": { + "creationTime": "2020-08-17T03:35:37.4588848Z", + "deletionTime": "2020-08-17T04:41:37.3442475Z", + "location": "eastus", + "restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125" + } + } + } + }, + "operationId": "DeletedAccounts_Get", + "title": "DeletedAccountGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json new file mode 100644 index 0000000000..6093d65130 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/DeletedAccounts_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto1125", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1125", + "properties": { + "creationTime": "2020-08-17T03:35:37.4588848Z", + "deletionTime": "2020-08-17T04:41:37.3442475Z", + "location": "eastus", + "restoreReference": "sto1125|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1125" + } + }, + { + "name": "sto1126", + "type": "Microsoft.Storage/deletedAccounts", + "id": "/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/eastus/deletedAccounts/sto1126", + "properties": { + "creationTime": "2020-08-19T15:10:21.5902165Z", + "deletionTime": "2020-08-20T06:11:55.1957302Z", + "location": "eastus", + "restoreReference": "sto1126|2020-08-17T03:35:37.4588848Z", + "storageAccountResourceId": "/subscriptions/{subscription-id}/resourceGroups/sto/providers/Microsoft.Storage/storageAccounts/sto1126" + } + } + ] + } + } + }, + "operationId": "DeletedAccounts_List", + "title": "DeletedAccountList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json new file mode 100644 index 0000000000..fe394c421f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encyrption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Get", + "title": "StorageAccountGetEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json new file mode 100644 index 0000000000..5565cb3abf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_List.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "name": "scope-1", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-1", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + }, + { + "name": "scope-2", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/scope-2", + "properties": { + "creationTime": "2018-10-16T04:32:14.3355306Z", + "keyVaultProperties": { + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c" + }, + "lastModifiedTime": "2018-10-17T06:23:14.4513306Z", + "source": "Microsoft.KeyVault", + "state": "Enabled" + } + } + ] + } + } + }, + "operationId": "EncryptionScopes_List", + "title": "StorageAccountEncryptionScopeList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json new file mode 100644 index 0000000000..7fd74727ed --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Patch.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": { + "properties": { + "keyVaultProperties": { + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c" + }, + "source": "Microsoft.KeyVault" + } + }, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "keyVaultProperties": { + "currentVersionedKeyIdentifier": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + "keyUri": "https://testvault.vault.core.windows.net/keys/key1/863425f1358359c", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "lastModifiedTime": "2018-10-17T06:23:14.4513306Z", + "source": "Microsoft.KeyVault", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Patch", + "title": "StorageAccountPatchEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json new file mode 100644 index 0000000000..c874c7e8e4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScope.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": {}, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + }, + "201": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Put", + "title": "StorageAccountPutEncryptionScope" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json new file mode 100644 index 0000000000..d116b0fae0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/EncryptionScopes_Put_StorageAccountPutEncryptionScopeWithInfrastructureEncryption.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "accountName": "{storage-account-name}", + "api-version": "2022-09-01", + "encryptionScope": { + "properties": { + "requireInfrastructureEncryption": true + } + }, + "encryptionScopeName": "{encryption-scope-name}", + "monitor": "true", + "resourceGroupName": "resource-group-name", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "requireInfrastructureEncryption": true, + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + }, + "201": { + "body": { + "name": "{encryption-scope-name}", + "type": "Microsoft.Storage/storageAccounts/encryptionScopes", + "id": "/subscriptions/{subscription-id}/resourceGroups/resource-group-name/providers/Microsoft.Storage/storageAccounts/{storage-account-name}/encryptionScopes/{encryption-scope-name}", + "properties": { + "creationTime": "2018-10-16T02:42:41.7633306Z", + "lastModifiedTime": "2018-10-16T02:42:41.7633306Z", + "requireInfrastructureEncryption": true, + "source": "Microsoft.Storage", + "state": "Enabled" + } + } + } + }, + "operationId": "EncryptionScopes_Put", + "title": "StorageAccountPutEncryptionScopeWithInfrastructureEncryption" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json new file mode 100644 index 0000000000..7a6ee80ee6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_GetServiceProperties.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "FileServices_GetServiceProperties", + "title": "GetFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json new file mode 100644 index 0000000000..b04a8e483c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_List.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + ] + } + } + }, + "operationId": "FileServices_List", + "title": "ListFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json new file mode 100644 index 0000000000..a2e6a26c4e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServices.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json new file mode 100644 index 0000000000..c7325add77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSecureSmbFeatures.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "authenticationMethods": "NTLMv2;Kerberos", + "channelEncryption": "AES-128-CCM;AES-128-GCM;AES-256-GCM", + "kerberosTicketEncryption": "RC4-HMAC;AES-256", + "versions": "SMB2.1;SMB3.0;SMB3.1.1" + } + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "protocolSettings": { + "smb": { + "authenticationMethods": "NTLMv2;Kerberos", + "channelEncryption": "AES-128-CCM;AES-128-GCM;AES-256-GCM", + "kerberosTicketEncryption": "RC4-HMAC;AES-256", + "versions": "SMB2.1;SMB3.0;SMB3.1.1" + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices_EnableSecureSmbFeatures" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json new file mode 100644 index 0000000000..0476733999 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileServices_SetServiceProperties_PutFileServicesEnableSmbMultichannel.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "FileServicesName": "default", + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/fileServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/fileServices/default", + "properties": { + "protocolSettings": { + "smb": { + "multichannel": { + "enabled": true + } + } + } + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + } + }, + "operationId": "FileServices_SetServiceProperties", + "title": "PutFileServices_EnableSMBMultichannel" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json new file mode 100644 index 0000000000..b42600491d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_CreateNfsShares.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountName": "sto666", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "enabledProtocols": "NFS" + } + }, + "monitor": "true", + "resourceGroupName": "res346", + "shareName": "share1235", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "enabledProtocols": "NFS" + } + } + }, + "201": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "enabledProtocols": "NFS" + } + } + } + }, + "operationId": "FileShares_Create", + "title": "Create NFS Shares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json new file mode 100644 index 0000000000..bbafca0a7f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutShares.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": {}, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185" + } + }, + "201": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185" + } + } + }, + "operationId": "FileShares_Create", + "title": "PutShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json new file mode 100644 index 0000000000..53e6183cec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Create_PutSharesWithAccessTier.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "accountName": "sto666", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "accessTier": "Hot" + } + }, + "monitor": "true", + "resourceGroupName": "res346", + "shareName": "share1235", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "accessTier": "Hot" + } + } + }, + "201": { + "body": { + "name": "share1235", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235", + "properties": { + "accessTier": "Hot" + } + } + } + }, + "operationId": "FileShares_Create", + "title": "PutShares with Access Tier" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json new file mode 100644 index 0000000000..d7a6ea2e0d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto4506", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4079", + "shareName": "share9689", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "FileShares_Delete", + "title": "DeleteShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json new file mode 100644 index 0000000000..e9e9e9779d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShareStats.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "$expand": "stats", + "accountName": "sto6217", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9871", + "shareName": "share1634", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1634", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634", + "properties": { + "lastModifiedTime": "2019-05-26T05:06:14Z", + "shareQuota": 1024, + "shareUsageBytes": 652945 + } + } + } + }, + "operationId": "FileShares_Get", + "title": "GetShareStats" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json new file mode 100644 index 0000000000..ff7b406b63 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Get_GetShares.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto6217", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9871", + "shareName": "share1634", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share1634", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D592D74CC20EBA\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9871/providers/Microsoft.Storage/storageAccounts/sto6217/fileServices/default/shares/share1634", + "properties": { + "lastModifiedTime": "2019-05-26T05:06:14Z", + "shareQuota": 1024 + } + } + } + }, + "operationId": "FileShares_Get", + "title": "GetShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json new file mode 100644 index 0000000000..c35eae0f42 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_AcquireALeaseOnAShare.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "action": "Acquire", + "breakPeriod": null, + "leaseDuration": -1, + "leaseId": null, + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "shareName": "share124", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d" + } + } + }, + "operationId": "FileShares_Lease", + "title": "Acquire a lease on a share" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json new file mode 100644 index 0000000000..4de3e7cb2c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Lease_BreakALeaseOnAShare.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "action": "Break", + "breakPeriod": null, + "leaseDuration": null, + "leaseId": "8698f513-fa75-44a1-b8eb-30ba336af27d", + "proposedLeaseId": null + }, + "resourceGroupName": "res3376", + "shareName": "share12", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "leaseTimeSeconds": "0" + } + } + }, + "operationId": "FileShares_Lease", + "title": "Break a lease on a share" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json new file mode 100644 index 0000000000..6a18e10c1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListDeletedShares.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "$expand": "deleted", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "share1644", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644_1234567890", + "properties": { + "deleted": true, + "deletedTime": "2019-12-14T08:20:47Z", + "lastModifiedTime": "2019-05-14T08:20:47Z", + "remainingRetentionDays": 30, + "shareQuota": 1024, + "version": "1234567890" + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListDeletedShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json new file mode 100644 index 0000000000..2dfaa824a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShareSnapshots.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "$expand": "snapshots", + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024 + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2020-10-26T05:47:05.0000000Z", + "shareQuota": 1024, + "snapshotTime": "2020-10-26T05:48:07.0000000Z" + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListShareSnapshots" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json new file mode 100644 index 0000000000..13f1f9ffe7 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_List_ListShares.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto1590/share5103", + "value": [ + { + "name": "share1644", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847D51C7DE\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share1644", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + }, + { + "name": "share4052", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "etag": "\"0x8D589847DAB5AF9\"", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/fileServices/default/shares/share4052", + "properties": { + "lastModifiedTime": "2019-05-14T08:20:47Z", + "shareQuota": 1024 + } + } + ] + } + } + }, + "operationId": "FileShares_List", + "title": "ListShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json new file mode 100644 index 0000000000..ed73b3b7d9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Restore.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "deletedShare": { + "deletedShareName": "share1249", + "deletedShareVersion": "1234567890" + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share1249", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "FileShares_Restore", + "title": "RestoreShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json new file mode 100644 index 0000000000..346853407b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShareAcls.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2021-05-01T08:49:37.0000000Z", + "permission": "rwd", + "startTime": "2021-04-01T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + } + ] + } + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2021-05-01T08:49:37.0000000Z", + "permission": "rwd", + "startTime": "2021-04-01T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + } + ] + } + } + } + }, + "operationId": "FileShares_Update", + "title": "UpdateShareAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json new file mode 100644 index 0000000000..534fe3b90d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/FileShares_Update_UpdateShares.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "fileShare": { + "properties": { + "metadata": { + "type": "image" + } + } + }, + "monitor": "true", + "resourceGroupName": "res3376", + "shareName": "share6185", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "share6185", + "type": "Microsoft.Storage/storageAccounts/fileServices/shares", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185", + "properties": { + "metadata": { + "type": "image" + } + } + } + } + }, + "operationId": "FileShares_Update", + "title": "UpdateShares" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json new file mode 100644 index 0000000000..7ab6b80679 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_CreateLocalUser.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "properties": { + "properties": { + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykey=" + } + ] + } + }, + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000", + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykey=" + } + ] + } + } + } + }, + "operationId": "LocalUsers_CreateOrUpdate", + "title": "CreateLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json new file mode 100644 index 0000000000..1ebeb4da39 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_CreateOrUpdate_UpdateLocalUser.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "properties": { + "properties": { + "hasSharedKey": false, + "hasSshKey": false, + "hasSshPassword": false, + "homeDirectory": "homedirectory2" + } + }, + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": false, + "hasSshKey": false, + "hasSshPassword": false, + "homeDirectory": "homedirectory2", + "sid": "S-1-2-0-3528686663-1788730862-2791910117-1000" + } + } + } + }, + "operationId": "LocalUsers_CreateOrUpdate", + "title": "UpdateLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json new file mode 100644 index 0000000000..ebd417fa37 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "LocalUsers_Delete", + "title": "DeleteLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json new file mode 100644 index 0000000000..a82bbd39bc --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_Get.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": true, + "hasSshKey": true, + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000" + } + } + } + }, + "operationId": "LocalUsers_Get", + "title": "GetLocalUser" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json new file mode 100644 index 0000000000..7eb0119d1a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_List.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "user1", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/loalUsers/user1", + "properties": { + "hasSharedKey": true, + "hasSshKey": true, + "hasSshPassword": true, + "homeDirectory": "homedirectory", + "permissionScopes": [ + { + "permissions": "rwd", + "resourceName": "share1", + "service": "file" + }, + { + "permissions": "rw", + "resourceName": "share2", + "service": "file" + } + ], + "sid": "S-1-2-0-125132-153423-36235-1000" + } + }, + { + "name": "user2", + "type": "Microsoft.Storage/storageAccounts/localUsers", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/loalUsers/user2", + "properties": { + "hasSharedKey": true, + "hasSshKey": false, + "hasSshPassword": true, + "permissionScopes": [ + { + "permissions": "rw", + "resourceName": "resourcename", + "service": "blob" + } + ], + "sid": "S-1-2-0-533672-235636-66334-1001" + } + } + ] + } + } + }, + "operationId": "LocalUsers_List", + "title": "ListLocalUsers" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json new file mode 100644 index 0000000000..8be916ca3e --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_ListKeys.json @@ -0,0 +1,25 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "sharedKey": "", + "sshAuthorizedKeys": [ + { + "description": "key name", + "key": "ssh-rsa keykeykeykeykew=" + } + ] + } + } + }, + "operationId": "LocalUsers_ListKeys", + "title": "ListLocalUserKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json new file mode 100644 index 0000000000..910f3146fb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/LocalUsers_RegeneratePassword.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}", + "username": "user1" + }, + "responses": { + "200": { + "body": { + "sshPassword": "" + } + } + }, + "operationId": "LocalUsers_RegeneratePassword", + "title": "RegenerateLocalUserPassword" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json new file mode 100644 index 0000000000..d9872d51bf --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicies.json @@ -0,0 +1,182 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + }, + { + "name": "olcmtest2", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + } + }, + "filters": { + "blobIndexMatch": [ + { + "name": "tag1", + "op": "==", + "value": "val1" + }, + { + "name": "tag2", + "op": "==", + "value": "val2" + } + ], + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer2" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + }, + { + "name": "olcmtest2", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + } + }, + "filters": { + "blobIndexMatch": [ + { + "name": "tag1", + "op": "==", + "value": "val1" + }, + { + "name": "tag2", + "op": "==", + "value": "val2" + } + ], + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer2" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json new file mode 100644 index 0000000000..15a301f9f1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyBaseBlobDaysAfterCreationActions.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_BaseBlobDaysAfterCreationActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json new file mode 100644 index 0000000000..5693609745 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyColdTierActions.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCold": { + "daysAfterModificationGreaterThan": 30 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCold": { + "daysAfterModificationGreaterThan": 30 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 30 + }, + "tierToCold": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyColdTierActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json new file mode 100644 index 0000000000..5e4dd9a56a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyForBlockAndAppendBlobs.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 90 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 90 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob", + "appendBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyForBlockAndAppendBlobs" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json new file mode 100644 index 0000000000..4aa50777af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyHotTierActions.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "tierToHot": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2021-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "tierToHot": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "tierToHot": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyHotTierActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json new file mode 100644 index 0000000000..9fbf02daa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastAccessTimeBasedBlobActions.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterLastAccessTimeGreaterThan": 1000 + }, + "enableAutoTierToHotFromCool": true, + "tierToArchive": { + "daysAfterLastAccessTimeGreaterThan": 90 + }, + "tierToCool": { + "daysAfterLastAccessTimeGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_LastAccessTimeBasedBlobActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json new file mode 100644 index 0000000000..df907098d1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyLastTierChangeTimeActions.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterLastTierChangeGreaterThan": 120, + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + }, + "version": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterLastTierChangeGreaterThan": 120, + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + }, + "version": { + "tierToArchive": { + "daysAfterCreationGreaterThan": 30, + "daysAfterLastTierChangeGreaterThan": 90 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicy_LastTierChangeTimeActions" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json new file mode 100644 index 0000000000..458a9e246a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_CreateOrUpdate_StorageAccountSetManagementPolicyWithSnapshotAndVersion.json @@ -0,0 +1,136 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "properties": { + "properties": { + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T02:53:39.0932539Z", + "policy": { + "rules": [ + { + "name": "olcmtest1", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + }, + "version": { + "delete": { + "daysAfterCreationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterCreationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer1" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_CreateOrUpdate", + "title": "StorageAccountSetManagementPolicyWithSnapshotAndVersion" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json new file mode 100644 index 0000000000..f25c2d4a53 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ManagementPolicies_Delete", + "title": "StorageAccountDeleteManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json new file mode 100644 index 0000000000..2fe4aaea77 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ManagementPolicies_Get.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "managementPolicyName": "default", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "DefaultManagementPolicy", + "type": "Microsoft.Storage/storageAccounts/managementPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/managementPolicies/default", + "properties": { + "lastModifiedTime": "2018-06-08T03:01:55.7168089Z", + "policy": { + "rules": [ + { + "name": "olcmtest", + "type": "Lifecycle", + "definition": { + "actions": { + "baseBlob": { + "delete": { + "daysAfterModificationGreaterThan": 1000 + }, + "tierToArchive": { + "daysAfterModificationGreaterThan": 90 + }, + "tierToCool": { + "daysAfterModificationGreaterThan": 30 + } + }, + "snapshot": { + "delete": { + "daysAfterCreationGreaterThan": 30 + } + } + }, + "filters": { + "blobTypes": [ + "blockBlob" + ], + "prefixMatch": [ + "olcmtestcontainer" + ] + } + }, + "enabled": true + } + ] + } + } + } + } + }, + "operationId": "ManagementPolicies_Get", + "title": "StorageAccountGetManagementPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json new file mode 100644 index 0000000000..37c965f6a5 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnDestination.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "accountName": "dst112", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "default", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "sourceContainer": "scont139" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountCreateObjectReplicationPolicyOnDestination" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json new file mode 100644 index 0000000000..380b839ba6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountCreateObjectReplicationPolicyOnSource.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "accountName": "src1122", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "minCreationTime": "2020-02-19T16:05:00Z", + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "minCreationTime": "2020-02-19T16:05:00Z", + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountCreateObjectReplicationPolicyOnSource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json new file mode 100644 index 0000000000..ecefc4cce2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnDestination.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "accountName": "dst112", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + }, + { + "destinationContainer": "dcont179", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/dst112/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountUpdateObjectReplicationPolicyOnDestination" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json new file mode 100644 index 0000000000..9106f661b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_CreateOrUpdate_StorageAccountUpdateObjectReplicationPolicyOnSource.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "accountName": "src1122", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "properties": { + "destinationAccount": "dst112", + "rules": [ + { + "destinationContainer": "dcont139", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "scont139" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "2a20bb73-5717-4635-985a-5d4cf777438f", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7687/providers/Microsoft.Storage/storageAccounts/src1122/objectReplicationPolicies/2a20bb73-5717-4635-985a-5d4cf777438f", + "properties": { + "destinationAccount": "dst112", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "2a20bb73-5717-4635-985a-5d4cf777438f", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "ruleId": "d5d18a48-8801-4554-aeaa-74faf65f5ef9", + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "dcont179", + "ruleId": "cfbb4bc2-8b60-429f-b05a-d1e0942b33b2", + "sourceContainer": "scont179" + } + ], + "sourceAccount": "src1122" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_CreateOrUpdate", + "title": "StorageAccountUpdateObjectReplicationPolicyOnSource" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json new file mode 100644 index 0000000000..b6a2b64493 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "{objectReplicationPolicy-Id}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "ObjectReplicationPolicies_Delete", + "title": "StorageAccountDeleteObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json new file mode 100644 index 0000000000..35b0049b21 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_Get.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "objectReplicationPolicyId": "{objectReplicationPolicy-Id}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{objectReplicationPolicy-Id}", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/{objectReplicationPolicy-Id}", + "properties": { + "destinationAccount": "destAccount1", + "enabledTime": "2019-06-08T03:01:55.7168089Z", + "policyId": "{objectReplicationPolicy-Id}", + "rules": [ + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobA", + "blobB" + ] + }, + "sourceContainer": "sourceContainer1" + }, + { + "destinationContainer": "destContainer1", + "filters": { + "prefixMatch": [ + "blobC", + "blobD" + ] + }, + "sourceContainer": "sourceContainer1" + } + ], + "sourceAccount": "sto2527" + } + } + } + }, + "operationId": "ObjectReplicationPolicies_Get", + "title": "StorageAccountGetObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json new file mode 100644 index 0000000000..318ef4e4af --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/ObjectReplicationPolicies_List.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "c6c23999-fd4e-433a-bcf9-1db69d27cd8a", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/objectReplicationPolicies/c6c23999-fd4e-433a-bcf9-1db69d27cd8a", + "properties": { + "destinationAccount": "destAccount1", + "sourceAccount": "sto2527" + } + }, + { + "name": "141d23dc-8958-4b48-b6e6-5a40bf1af116", + "type": "Microsoft.Storage/storageAccounts/objectReplicationPolicies", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto1590/objectReplicationPolicies/141d23dc-8958-4b48-b6e6-5a40bf1af116", + "properties": { + "destinationAccount": "destAccount2", + "sourceAccount": "sto2527" + } + } + ] + } + } + }, + "operationId": "ObjectReplicationPolicies_List", + "title": "StorageAccountListObjectReplicationPolicies" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json new file mode 100644 index 0000000000..417d613056 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Delete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "PrivateEndpointConnections_Delete", + "title": "StorageAccountDeletePrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json new file mode 100644 index 0000000000..cbc22acab0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Get.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Get", + "title": "StorageAccountGetPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json new file mode 100644 index 0000000000..48c63c31c9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_List.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + }, + { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest02" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + }, + "operationId": "PrivateEndpointConnections_List", + "title": "StorageAccountListPrivateEndpointConnections" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json new file mode 100644 index 0000000000..c312f1ff28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateEndpointConnections_Put.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "accountName": "sto9699", + "api-version": "2022-09-01", + "monitor": "true", + "privateEndpointConnectionName": "{privateEndpointConnectionName}", + "properties": { + "properties": { + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "status": "Approved" + } + } + }, + "resourceGroupName": "res7687", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "{privateEndpointConnectionName}", + "type": "Microsoft.Storage/storageAccounts/privateEndpointConnections", + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Storage/storageAccounts/sto288/privateEndpointConnections/{privateEndpointConnectionName}", + "properties": { + "privateEndpoint": { + "id": "/subscriptions/{subscription-id}/resourceGroups/res7231/providers/Microsoft.Network/privateEndpoints/petest01" + }, + "privateLinkServiceConnectionState": { + "description": "Auto-Approved", + "actionRequired": "None", + "status": "Approved" + }, + "provisioningState": "Succeeded" + } + } + } + }, + "operationId": "PrivateEndpointConnections_Put", + "title": "StorageAccountPutPrivateEndpointConnection" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json new file mode 100644 index 0000000000..8aaa066b45 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/PrivateLinkResources_ListByStorageAccount.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "accountName": "sto2527", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res6977", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "blob", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob", + "properties": { + "groupId": "blob", + "requiredMembers": [ + "blob" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + }, + { + "name": "blob_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/blob_secondary", + "properties": { + "groupId": "blob_secondary", + "requiredMembers": [ + "blob_secondary" + ], + "requiredZoneNames": [ + "privatelink.blob.core.windows.net" + ] + } + }, + { + "name": "table", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table", + "properties": { + "groupId": "table", + "requiredMembers": [ + "table" + ], + "requiredZoneNames": [ + "privatelink.table.core.windows.net" + ] + } + }, + { + "name": "table_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/table_secondary", + "properties": { + "groupId": "table_secondary", + "requiredMembers": [ + "table_secondary" + ], + "requiredZoneNames": [ + "privatelink.table.core.windows.net" + ] + } + }, + { + "name": "dfs", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs", + "properties": { + "groupId": "dfs", + "requiredMembers": [ + "dfs" + ], + "requiredZoneNames": [ + "privatelink.dfs.core.windows.net" + ] + } + }, + { + "name": "dfs_secondary", + "type": "Microsoft.Storage/storageAccounts/privateLinkResources", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6977/providers/Microsoft.Storage/storageAccounts/sto2527/privateLinkResources/dfs_secondary", + "properties": { + "groupId": "dfs_secondary", + "requiredMembers": [ + "dfs_secondary" + ], + "requiredZoneNames": [ + "privatelink.dfs.core.windows.net" + ] + } + } + ] + } + } + }, + "operationId": "PrivateLinkResources_ListByStorageAccount", + "title": "StorageAccountListPrivateLinkResources" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json new file mode 100644 index 0000000000..cee806bd5f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_GetServiceProperties.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "queueServiceName": "default", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "QueueServices_GetServiceProperties", + "title": "QueueServicesGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json new file mode 100644 index 0000000000..48b34d2dba --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + ] + } + } + }, + "operationId": "QueueServices_List", + "title": "QueueServicesList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json new file mode 100644 index 0000000000..f541b0a1ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/QueueServices_SetServiceProperties.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "queueServiceName": "default", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/queueServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/queueServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "QueueServices_SetServiceProperties", + "title": "QueueServicesPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json new file mode 100644 index 0000000000..5d116a0d30 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPut.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": {}, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185" + } + } + }, + "operationId": "Queue_Create", + "title": "QueueOperationPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json new file mode 100644 index 0000000000..62a7b99277 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Create_QueueOperationPutWithMetadata.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": { + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + }, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + } + }, + "operationId": "Queue_Create", + "title": "QueueOperationPutWithMetadata" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json new file mode 100644 index 0000000000..cec8e4659a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "204": {} + }, + "operationId": "Queue_Delete", + "title": "QueueOperationDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json new file mode 100644 index 0000000000..062d4a18d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Get.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + } + }, + "operationId": "Queue_Get", + "title": "QueueOperationGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json new file mode 100644 index 0000000000..6afa17ca58 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_List.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues?api-version=2022-09-01&$maxpagesize=2&$skipToken=/sto328/queue6187", + "value": [ + { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + }, + { + "name": "queue6186", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6186", + "properties": { + "metadata": { + "sample1": "meta1", + "sample2": "meta2" + } + } + } + ] + } + } + }, + "operationId": "Queue_List", + "title": "QueueOperationList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json new file mode 100644 index 0000000000..cccabeb7ec --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Queue_Update.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "queue": {}, + "queueName": "queue6185", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "queue6185", + "type": "Microsoft.Storage/storageAccounts/queueServices/queues", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/queueServices/default/queues/queue6185" + } + } + }, + "operationId": "Queue_Update", + "title": "QueueOperationPatch" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json new file mode 100644 index 0000000000..c43fccbae3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_AbortHierarchicalNamespaceMigration.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_AbortHierarchicalNamespaceMigration", + "title": "StorageAccountAbortHierarchicalNamespaceMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json new file mode 100644 index 0000000000..2204f5e2a1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_CheckNameAvailability.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": { + "name": "sto3363", + "type": "Microsoft.Storage/storageAccounts" + }, + "api-version": "2022-09-01", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nameAvailable": true + } + } + }, + "operationId": "StorageAccounts_CheckNameAvailability", + "title": "StorageAccountCheckNameAvailability" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json new file mode 100644 index 0000000000..f628c9432c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_NfsV3AccountCreate.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "isHnsEnabled": true, + "isNfsV3Enabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12" + } + ] + }, + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Premium_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "isHnsEnabled": true, + "isNfsV3Enabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Network/virtualNetworks/net123/subnets/subnet12" + } + ] + }, + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "NfsV3AccountCreate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json new file mode 100644 index 0000000000..dc8fdee9f4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreate.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json new file mode 100644 index 0000000000..3e187db0da --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToAad.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateAllowedCopyScopeToAAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json new file mode 100644 index 0000000000..aece4b54ff --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateAllowedCopyScopeToPrivateLink.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "PrivateLink", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "PrivateLink", + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateAllowedCopyScopeToPrivateLink" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json new file mode 100644 index 0000000000..7c324e4acb --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDisallowPublicNetworkAccess.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDisallowPublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json new file mode 100644 index 0000000000..465bea7dd6 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToAzureDnsZone.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "dnsEndpointType": "AzureDnsZone", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "dnsEndpointType": "AzureDnsZone", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.z24.blob.storage.azure.net/", + "dfs": "https://sto4445.z24.dfs.storage.azure.net/", + "file": "https://sto4445.z24.file.storage.azure.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.z24.blob.storage.azure.net/", + "dfs": "https://sto4445-internetrouting.z24.dfs.storage.azure.net/", + "file": "https://sto4445-internetrouting.z24.file.storage.azure.net/", + "web": "https://sto4445-internetrouting.z24.web.storage.azure.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.z24.blob.storage.azure.net/", + "dfs": "https://sto4445-microsoftrouting.z24.dfs.storage.azure.net/", + "file": "https://sto4445-microsoftrouting.z24.file.storage.azure.net/", + "queue": "https://sto4445-microsoftrouting.z24.queue.storage.azure.net/", + "table": "https://sto4445-microsoftrouting.z24.table.storage.azure.net/", + "web": "https://sto4445-microsoftrouting.z24.web.storage.azure.net/" + }, + "queue": "https://sto4445.z24.queue.storage.azure.net/", + "table": "https://sto4445.z24.table.storage.azure.net/", + "web": "https://sto4445.z24.web.storage.azure.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDnsEndpointTypeToAzureDnsZone" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json new file mode 100644 index 0000000000..2d92360768 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateDnsEndpointTypeToStandard.json @@ -0,0 +1,153 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "dnsEndpointType": "Standard", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "dnsEndpointType": "Standard", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateDnsEndpointTypeToStandard" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json new file mode 100644 index 0000000000..75b6f34dc2 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateEnablePublicNetworkAccess.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isHnsEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "publicNetworkAccess": "Enabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + }, + "sku": { + "name": "Standard_GRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto4445-internetrouting.blob.core.windows.net/", + "dfs": "https://sto4445-internetrouting.dfs.core.windows.net/", + "file": "https://sto4445-internetrouting.file.core.windows.net/", + "web": "https://sto4445-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto4445-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto4445-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto4445-microsoftrouting.file.core.windows.net/", + "queue": "https://sto4445-microsoftrouting.queue.core.windows.net/", + "table": "https://sto4445-microsoftrouting.table.core.windows.net/", + "web": "https://sto4445-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Enabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateEnablePublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json new file mode 100644 index 0000000000..ebb3c0feac --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreatePremiumBlockBlobStorage.json @@ -0,0 +1,91 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "kind": "BlockBlobStorage", + "location": "eastus", + "properties": { + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "minimumTlsVersion": "TLS1_2" + }, + "sku": { + "name": "Premium_LRS" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "accessTier": "Premium", + "allowBlobPublicAccess": false, + "creationTime": "2017-05-24T13:25:33.4863236Z", + "encryption": { + "keySource": "Microsoft.Storage", + "requireInfrastructureEncryption": false, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "minimumTlsVersion": "TLS1_2", + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Premium_LRS", + "tier": "Premium" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreatePremiumBlockBlobStorage" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json new file mode 100644 index 0000000000..2ae8f04303 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedEncryptionIdentityWithCmk.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateUserAssignedEncryptionIdentityWithCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json new file mode 100644 index 0000000000..359bc1b1b4 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "accountName": "sto131918", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "encryption": { + "identity": { + "federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res131918", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "federatedIdentityClientId": "f83c6b1b-4d34-47e4-bb34-9d83df58b540", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateUserAssignedIdentityWithFederatedIdentityClientId." +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json new file mode 100644 index 0000000000..4a69de864d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Create_StorageAccountCreateWithImmutabilityPolicy.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Unlocked" + } + } + }, + "sku": { + "name": "Standard_GRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "extendedLocation": { + "name": "losangeles001", + "type": "EdgeZone" + }, + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:25:33.4863236Z", + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Unlocked" + } + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus2euap", + "provisioningState": "Succeeded" + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + }, + "202": {} + }, + "operationId": "StorageAccounts_Create", + "title": "StorageAccountCreateWithImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json new file mode 100644 index 0000000000..73351c108d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "StorageAccounts_Delete", + "title": "StorageAccountDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json new file mode 100644 index 0000000000..497d33c22a --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailover.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_Failover", + "title": "StorageAccountFailover" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json new file mode 100644 index 0000000000..6ed4911a71 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Failover_StorageAccountFailoverPlanned.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "failoverType": "Planned", + "monitor": "true", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_Failover", + "title": "StorageAccountFailoverPlanned" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json new file mode 100644 index 0000000000..f1b47fff92 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetAsyncSkuConversionStatus.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "StorageV2", + "location": "eastus", + "properties": { + "allowBlobPublicAccess": false, + "minimumTlsVersion": "TLS1_2", + "storageAccountSkuConversionStatus": { + "endTime": "2021-09-02T02:53:39.0932539Z", + "skuConversionStatus": "InProgress", + "startTime": "2022-09-01T02:53:39.0932539Z", + "targetSkuName": "Standard_GRS" + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetAsyncSkuConversionStatus" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json new file mode 100644 index 0000000000..2e29a43255 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetProperties.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetProperties" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json new file mode 100644 index 0000000000..3bfa4418e0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkEnabled.json @@ -0,0 +1,106 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetPropertiesCMKEnabled" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json new file mode 100644 index 0000000000..aa559a8fd9 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_GetProperties_StorageAccountGetPropertiesCmkVersionExpirationTime.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyExpirationTimestamp": "2019-12-13T20:36:23.7023290Z", + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_GetProperties", + "title": "StorageAccountGetPropertiesCMKVersionExpirationTime" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json new file mode 100644 index 0000000000..986642b311 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_HierarchicalNamespaceMigration.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "accountName": "sto2434", + "api-version": "2022-09-01", + "requestType": "HnsOnValidationRequest", + "resourceGroupName": "res4228", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://endpoint:port/subscriptions/{subscription-id}/providers/Microsoft.Storage/locations/{location}/asyncoperations/{operationid}?monitor=true&api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_HierarchicalNamespaceMigration", + "title": "StorageAccountHierarchicalNamespaceMigration" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json new file mode 100644 index 0000000000..b605faedcd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_List.json @@ -0,0 +1,315 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "monitor": "true", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto1125", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res2627/providers/Microsoft.Storage/storageAccounts/sto1125", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:28:53.4540398Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "primaryEndpoints": { + "blob": "https://sto1125.blob.core.windows.net/", + "dfs": "https://sto1125.dfs.core.windows.net/", + "file": "https://sto1125.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto1125-internetrouting.blob.core.windows.net/", + "dfs": "https://sto1125-internetrouting.dfs.core.windows.net/", + "file": "https://sto1125-internetrouting.file.core.windows.net/", + "web": "https://sto1125-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto1125-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto1125-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto1125-microsoftrouting.file.core.windows.net/", + "queue": "https://sto1125-microsoftrouting.queue.core.windows.net/", + "table": "https://sto1125-microsoftrouting.table.core.windows.net/", + "web": "https://sto1125-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto1125.queue.core.windows.net/", + "table": "https://sto1125.table.core.windows.net/", + "web": "https://sto1125.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto3699", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto3699", + "identity": { + "type": "SystemAssigned", + "principalId": "356d057d-cba5-44dd-8a30-b2e547bc416b", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T10:06:30.6093014Z", + "primaryEndpoints": { + "blob": "https://sto3699.blob.core.windows.net/", + "file": "https://sto3699.file.core.windows.net/", + "queue": "https://sto3699.queue.core.windows.net/", + "table": "https://sto3699.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "geoReplicationStats": { + "canFailover": true, + "lastSyncTime": "2018-10-30T00:25:34Z", + "status": "Live" + }, + "isHnsEnabled": true, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto6637", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto6637", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T10:09:39.5625175Z", + "primaryEndpoints": { + "blob": "https://sto6637.blob.core.windows.net/", + "file": "https://sto6637.file.core.windows.net/", + "queue": "https://sto6637.queue.core.windows.net/", + "table": "https://sto6637.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto834", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res8186/providers/Microsoft.Storage/storageAccounts/sto834", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:28:20.8686541Z", + "primaryEndpoints": { + "blob": "https://sto834.blob.core.windows.net/", + "file": "https://sto834.file.core.windows.net/", + "queue": "https://sto834.queue.core.windows.net/", + "table": "https://sto834.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto9174", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/testcmk3/providers/Microsoft.Storage/storageAccounts/sto9174", + "identity": { + "type": "SystemAssigned", + "principalId": "933e3ddf-1802-4a51-9469-18a33b576f88", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T09:46:19.6556989Z", + "primaryEndpoints": { + "blob": "https://sto9174.blob.core.windows.net/", + "file": "https://sto9174.file.core.windows.net/", + "queue": "https://sto9174.queue.core.windows.net/", + "table": "https://sto9174.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + } + } + }, + "operationId": "StorageAccounts_List", + "title": "StorageAccountList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json new file mode 100644 index 0000000000..cd3c10ab68 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListAccountSAS.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "accountName": "sto8588", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "keyToSign": "key1", + "signedExpiry": "2017-05-24T11:42:03.1567373Z", + "signedPermission": "r", + "signedProtocol": "https,http", + "signedResourceTypes": "s", + "signedServices": "b", + "signedStart": "2017-05-24T10:42:03.1567373Z" + }, + "resourceGroupName": "res7985", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "accountSasToken": "sv=2015-04-05&ss=b&srt=s&sp=r&st=2017-05-24T10%3A42%3A03Z&se=2017-05-24T11%3A42%3A03Z&spr=https,http&sig=Z0I%2BEpM%2BPPlTC8ApfUf%2BcffO2aahMgZim3U0iArqsS0%3D" + } + } + }, + "operationId": "StorageAccounts_ListAccountSAS", + "title": "StorageAccountListAccountSAS" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json new file mode 100644 index 0000000000..ad31885e28 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListByResourceGroup.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2022-09-01", + "resourceGroupName": "res6117", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sto4036", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4036", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:24:47.818801Z", + "isHnsEnabled": true, + "primaryEndpoints": { + "blob": "https://sto4036.blob.core.windows.net/", + "dfs": "https://sto4036.dfs.core.windows.net/", + "file": "https://sto4036.file.core.windows.net/", + "queue": "https://sto4036.queue.core.windows.net/", + "table": "https://sto4036.table.core.windows.net/", + "web": "https://sto4036.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + }, + { + "name": "sto4452", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res6117/providers/Microsoft.Storage/storageAccounts/sto4452", + "kind": "Storage", + "location": "eastus", + "properties": { + "creationTime": "2017-05-24T13:24:15.7068366Z", + "primaryEndpoints": { + "blob": "https://sto4452.blob.core.windows.net/", + "file": "https://sto4452.file.core.windows.net/", + "queue": "https://sto4452.queue.core.windows.net/", + "table": "https://sto4452.table.core.windows.net/" + }, + "primaryLocation": "eastus", + "provisioningState": "Succeeded", + "secondaryLocation": "centraluseuap", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + ] + } + } + }, + "operationId": "StorageAccounts_ListByResourceGroup", + "title": "StorageAccountListByResourceGroup" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json new file mode 100644 index 0000000000..29533ec40c --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListKeys.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "accountName": "sto2220", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res418", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_ListKeys", + "title": "StorageAccountListKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json new file mode 100644 index 0000000000..07ea571eab --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_ListServiceSAS.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto1299", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "canonicalizedResource": "/blob/sto1299/music", + "signedExpiry": "2017-05-24T11:32:48.8457197Z", + "signedPermission": "l", + "signedResource": "c" + }, + "resourceGroupName": "res7439", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "serviceSasToken": "sv=2015-04-05&sr=c&se=2017-05-24T11%3A32%3A48Z&sp=l&sig=PoF8yBUGixsjzwroLmw7vG3VbGz4KB2woZC2D4C2oio%3D" + } + } + }, + "operationId": "StorageAccounts_ListServiceSAS", + "title": "StorageAccountListServiceSAS" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json new file mode 100644 index 0000000000..d91fd8d0d3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKerbKey.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "monitor": "true", + "regenerateKey": { + "keyName": "kerb1" + }, + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + }, + { + "keyName": "kerb1", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_RegenerateKey", + "title": "StorageAccountRegenerateKerbKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json new file mode 100644 index 0000000000..4e5eb91129 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RegenerateKey_StorageAccountRegenerateKey.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "monitor": "true", + "regenerateKey": { + "keyName": "key2" + }, + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "keys": [ + { + "keyName": "key1", + "permissions": "Full", + "value": "" + }, + { + "keyName": "key2", + "permissions": "Full", + "value": "" + } + ] + } + } + }, + "operationId": "StorageAccounts_RegenerateKey", + "title": "StorageAccountRegenerateKey" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json new file mode 100644 index 0000000000..1a114cdafd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RestoreBlobRanges.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "restoreId": "{restore_id}", + "status": "Succeeded" + } + }, + "202": { + "body": { + "parameters": { + "blobRanges": [ + { + "endRange": "container/blobpath2", + "startRange": "container/blobpath1" + }, + { + "endRange": "", + "startRange": "container2/blobpath3" + } + ], + "timeToRestore": "2019-04-20T15:30:00.0000000Z" + }, + "restoreId": "{restore_id}", + "status": "InProgress" + }, + "headers": { + "location": "https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000?api-version=2022-09-01" + } + } + }, + "operationId": "StorageAccounts_RestoreBlobRanges", + "title": "BlobRangesRestore" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json new file mode 100644 index 0000000000..4193e580a3 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_RevokeUserDelegationKeys.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "accountName": "sto3539", + "api-version": "2022-09-01", + "resourceGroupName": "res4167", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": {} + }, + "operationId": "StorageAccounts_RevokeUserDelegationKeys", + "title": "StorageAccountRevokeUserDelegationKeys" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json new file mode 100644 index 0000000000..6d2cf33b7d --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableAd.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "azureFilesIdentityBasedAuthentication": { + "activeDirectoryProperties": { + "accountType": "User", + "azureStorageSid": "S-1-5-21-2400535526-2334094090-2402026252-0012", + "domainGuid": "aebfc118-9fa9-4732-a21f-d98e41a77ae1", + "domainName": "adtest.com", + "domainSid": "S-1-5-21-2400535526-2334094090-2402026252", + "forestName": "adtest.com", + "netBiosDomainName": "adtest.com", + "samAccountName": "sam12498" + }, + "directoryServiceOptions": "AD" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "azureFilesIdentityBasedAuthentication": { + "activeDirectoryProperties": { + "accountType": "User", + "azureStorageSid": "S-1-5-21-2400535526-2334094090-2402026252-0012", + "domainGuid": "aebfc118-9fa9-4732-a21f-d98e41a77ae1", + "domainName": "adtest.com", + "domainSid": "S-1-5-21-2400535526-2334094090-2402026252", + "forestName": "adtest.com", + "netBiosDomainName": "adtest.com", + "samAccountName": "sam12498" + }, + "directoryServiceOptions": "AD" + }, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountEnableAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json new file mode 100644 index 0000000000..714ba8e871 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountEnableCmk.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "identity": { + "type": "SystemAssigned", + "principalId": "911871cc-ffd1-4fc4-ac11-7a316433ea66", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + }, + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountEnableCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json new file mode 100644 index 0000000000..96cd93d416 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdate.json @@ -0,0 +1,154 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "defaultToOAuthAuthentication": false, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "isLocalUserEnabled": true, + "isSftpEnabled": true, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "isLocalUserEnabled": true, + "isSftpEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdate" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json new file mode 100644 index 0000000000..826ea584c8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateAllowedCopyScopeToAad.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "allowedCopyScope": "AAD", + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateAllowedCopyScopeToAAD" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json new file mode 100644 index 0000000000..8ae576aac0 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateDisablePublicNetworkAccess.json @@ -0,0 +1,151 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "defaultAction": "Allow", + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ] + }, + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "allowBlobPublicAccess": false, + "allowSharedKeyAccess": true, + "creationTime": "2017-06-01T02:42:41.7633306Z", + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2019-12-11T20:49:31.7036140Z" + } + } + }, + "isHnsEnabled": true, + "keyCreationTime": { + "key1": "2021-03-18T04:42:22.4322836Z", + "key2": "2021-03-18T04:42:22.4322836Z" + }, + "keyPolicy": { + "keyExpirationPeriodInDays": 20 + }, + "minimumTlsVersion": "TLS1_2", + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "resourceAccessRules": [ + { + "resourceId": "/subscriptions/a7e99807-abbf-4642-bdec-2c809a96a8bc/resourceGroups/res9407/providers/Microsoft.Synapse/workspaces/testworkspace", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47" + } + ], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto8596.blob.core.windows.net/", + "dfs": "https://sto8596.dfs.core.windows.net/", + "file": "https://sto8596.file.core.windows.net/", + "internetEndpoints": { + "blob": "https://sto8596-internetrouting.blob.core.windows.net/", + "dfs": "https://sto8596-internetrouting.dfs.core.windows.net/", + "file": "https://sto8596-internetrouting.file.core.windows.net/", + "web": "https://sto8596-internetrouting.web.core.windows.net/" + }, + "microsoftEndpoints": { + "blob": "https://sto8596-microsoftrouting.blob.core.windows.net/", + "dfs": "https://sto8596-microsoftrouting.dfs.core.windows.net/", + "file": "https://sto8596-microsoftrouting.file.core.windows.net/", + "queue": "https://sto8596-microsoftrouting.queue.core.windows.net/", + "table": "https://sto8596-microsoftrouting.table.core.windows.net/", + "web": "https://sto8596-microsoftrouting.web.core.windows.net/" + }, + "queue": "https://sto8596.queue.core.windows.net/", + "table": "https://sto8596.table.core.windows.net/", + "web": "https://sto8596.web.core.windows.net/" + }, + "primaryLocation": "eastus2(stage)", + "provisioningState": "Succeeded", + "publicNetworkAccess": "Disabled", + "routingPreference": { + "publishInternetEndpoints": true, + "publishMicrosoftEndpoints": true, + "routingChoice": "MicrosoftRouting" + }, + "sasPolicy": { + "expirationAction": "Log", + "sasExpirationPeriod": "1.15:59:59" + }, + "secondaryLocation": "northcentralus(stage)", + "statusOfPrimary": "available", + "statusOfSecondary": "available", + "supportsHttpsTrafficOnly": false + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateDisablePublicNetworkAccess" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json new file mode 100644 index 0000000000..778f1fe0ef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedEncryptionIdentityWithCmk.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "accountName": "sto4445", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "properties": { + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res9101", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateUserAssignedEncryptionIdentityWithCMK" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json new file mode 100644 index 0000000000..1e1e636650 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "accountName": "sto131918", + "api-version": "2022-09-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": {} + } + }, + "kind": "Storage", + "properties": { + "encryption": { + "identity": { + "federatedIdentityClientId": "3109d1c4-a5de-4d84-8832-feabb916a4b6", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account" + }, + "file": { + "enabled": true, + "keyType": "Account" + } + } + } + }, + "sku": { + "name": "Standard_LRS" + } + }, + "resourceGroupName": "res131918", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto4445", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.Storage/storageAccounts/sto4445", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/{subscription-id}/resourceGroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}": { + "clientId": "fbaa6278-1ecc-415c-819f-6e2058d3acb5", + "principalId": "8d823284-1060-42a5-9ec4-ed3d831e24d7" + } + } + }, + "kind": "StorageV2", + "location": "eastus", + "properties": { + "accessTier": "Hot", + "creationTime": "2020-12-15T00:43:14.0839093Z", + "encryption": { + "identity": { + "federatedIdentityClientId": "3109d1c4-a5de-4d84-8832-feabb916a4b6", + "userAssignedIdentity": "/subscriptions/{subscription-id}/resourcegroups/res9101/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{managed-identity-name}" + }, + "keySource": "Microsoft.Keyvault", + "keyvaultproperties": { + "currentVersionedKeyIdentifier": "https://myvault8569.vault.azure.net/keys/wrappingKey/0682afdd9c104f4285df20107e956cad", + "keyname": "wrappingKey", + "keyvaulturi": "https://myvault8569.vault.azure.net", + "keyversion": "", + "lastKeyRotationTimestamp": "2019-12-13T20:36:23.7023290Z" + }, + "services": { + "blob": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + }, + "file": { + "enabled": true, + "keyType": "Account", + "lastEnabledTime": "2020-12-15T00:43:14.1739587Z" + } + } + }, + "networkAcls": { + "bypass": "AzureServices", + "defaultAction": "Allow", + "ipRules": [], + "virtualNetworkRules": [] + }, + "primaryEndpoints": { + "blob": "https://sto4445.blob.core.windows.net/", + "dfs": "https://sto4445.dfs.core.windows.net/", + "file": "https://sto4445.file.core.windows.net/", + "queue": "https://sto4445.queue.core.windows.net/", + "table": "https://sto4445.table.core.windows.net/", + "web": "https://sto4445.web.core.windows.net/" + }, + "primaryLocation": "eastus", + "privateEndpointConnections": [], + "provisioningState": "Succeeded", + "statusOfPrimary": "available", + "supportsHttpsTrafficOnly": true + }, + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "tags": {} + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateUserAssignedIdentityWithFederatedIdentityClientId" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json new file mode 100644 index 0000000000..dc9393936f --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/StorageAccounts_Update_StorageAccountUpdateWithImmutabilityPolicy.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "accountName": "sto8596", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Locked" + } + } + } + }, + "resourceGroupName": "res9407", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "name": "sto8596", + "type": "Microsoft.Storage/storageAccounts", + "id": "/subscriptions/{subscription-id}/resourceGroups/res9407/providers/Microsoft.Storage/storageAccounts/sto8596", + "kind": "Storage", + "location": "eastus2(stage)", + "properties": { + "immutableStorageWithVersioning": { + "enabled": true, + "immutabilityPolicy": { + "allowProtectedAppendWrites": true, + "immutabilityPeriodSinceCreationInDays": 15, + "state": "Locked" + } + } + }, + "sku": { + "name": "Standard_GRS", + "tier": "Standard" + }, + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + }, + "operationId": "StorageAccounts_Update", + "title": "StorageAccountUpdateWithImmutabilityPolicy" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json new file mode 100644 index 0000000000..387de65dc1 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_GetServiceProperties.json @@ -0,0 +1,84 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}", + "tableServiceName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "TableServices_GetServiceProperties", + "title": "TableServicesGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json new file mode 100644 index 0000000000..4a227a03d8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_List.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "accountName": "sto1590", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + ] + } + } + }, + "operationId": "TableServices_List", + "title": "TableServicesList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json new file mode 100644 index 0000000000..d77e657aa8 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/TableServices_SetServiceProperties.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "accountName": "sto8607", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + }, + "resourceGroupName": "res4410", + "subscriptionId": "{subscription-id}", + "tableServiceName": "default" + }, + "responses": { + "200": { + "body": { + "name": "default", + "type": "Microsoft.Storage/storageAccounts/tableServices", + "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/tableServices/default", + "properties": { + "cors": { + "corsRules": [ + { + "allowedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "allowedMethods": [ + "GET", + "HEAD", + "POST", + "OPTIONS", + "MERGE", + "PUT" + ], + "allowedOrigins": [ + "http://www.contoso.com", + "http://www.fabrikam.com" + ], + "exposedHeaders": [ + "x-ms-meta-*" + ], + "maxAgeInSeconds": 100 + }, + { + "allowedHeaders": [ + "*" + ], + "allowedMethods": [ + "GET" + ], + "allowedOrigins": [ + "*" + ], + "exposedHeaders": [ + "*" + ], + "maxAgeInSeconds": 2 + }, + { + "allowedHeaders": [ + "x-ms-meta-12345675754564*" + ], + "allowedMethods": [ + "GET", + "PUT" + ], + "allowedOrigins": [ + "http://www.abc23.com", + "https://www.fabrikam.com/*" + ], + "exposedHeaders": [ + "x-ms-meta-abc", + "x-ms-meta-data*", + "x-ms-meta-target*" + ], + "maxAgeInSeconds": 2000 + } + ] + } + } + } + } + }, + "operationId": "TableServices_SetServiceProperties", + "title": "TableServicesPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json new file mode 100644 index 0000000000..ea06b856bd --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPut.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Create", + "title": "TableOperationPut" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json new file mode 100644 index 0000000000..0c21d06cee --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Create_TableOperationPutOrPatchAcls.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ] + } + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ], + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Create", + "title": "TableOperationPutOrPatchAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json new file mode 100644 index 0000000000..e642694a02 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Delete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "204": {} + }, + "operationId": "Table_Delete", + "title": "TableOperationDelete" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json new file mode 100644 index 0000000000..70f9d62e40 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Get.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Get", + "title": "TableOperationGet" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json new file mode 100644 index 0000000000..69de240793 --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_List.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res9290", + "subscriptionId": "{subscription-id}" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://sto1590endpoint/subscriptions/{subscription-id}/resourceGroups/res9290/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables?api-version=2022-09-01&NextTableName=1!40!bXl0YWJsZXNoYzU0OAEwMWQ2MTI5ZTJmYjVmODFh", + "value": [ + { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + }, + { + "name": "table6186", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6186", + "properties": { + "tableName": "table6186" + } + } + ] + } + } + }, + "operationId": "Table_List", + "title": "TableOperationList" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json new file mode 100644 index 0000000000..29f691398b --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPatch.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Update", + "title": "TableOperationPatch" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json new file mode 100644 index 0000000000..7d3a465aef --- /dev/null +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/examples/2022-09-01/Table_Update_TableOperationPutOrPatchAcls.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "accountName": "sto328", + "api-version": "2022-09-01", + "monitor": "true", + "parameters": { + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ] + } + }, + "resourceGroupName": "res3376", + "subscriptionId": "{subscription-id}", + "tableName": "table6185" + }, + "responses": { + "200": { + "body": { + "name": "table6185", + "type": "Microsoft.Storage/storageAccounts/tableServices/tables", + "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185", + "properties": { + "signedIdentifiers": [ + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "raud", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI" + }, + { + "accessPolicy": { + "expiryTime": "2022-03-20T08:49:37.0000000Z", + "permission": "rad", + "startTime": "2022-03-17T08:49:37.0000000Z" + }, + "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI" + } + ], + "tableName": "table6185" + } + } + } + }, + "operationId": "Table_Update", + "title": "TableOperationPutOrPatchAcls" +} \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp index 1732a5c168..8ca5d65a99 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/main.tsp @@ -33,7 +33,8 @@ using TypeSpec.Versioning; title: "Azure Storage resource management API.", }) @versioned(Versions) -@armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v1) +// FIXME: Common type version v1 is not supported for now. +// @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v1) @doc("The Azure Storage Management API.") namespace Microsoft.Storage; @@ -41,5 +42,6 @@ namespace Microsoft.Storage; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2022-09-01 API version.") v2022_09_01: "2022-09-01", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp index e766f07a70..dfe7bb8ab5 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/models.tsp @@ -7,11 +7,13 @@ using TypeSpec.Rest; using TypeSpec.Http; using Azure.Core; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.Storage; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The SKU name. Required for account creation; optional for update. Note that in older versions, SKU name was called accountType.") enum SkuName { Standard_LRS, Standard_GRS, @@ -23,6 +25,7 @@ enum SkuName { Standard_RAGZRS, } +@doc("Indicates the type of storage account.") enum Kind { Storage, StorageV2, @@ -31,15 +34,18 @@ enum Kind { BlockBlobStorage, } +@doc("The reason for the restriction. As of now this can be \"QuotaId\" or \"NotAvailableForSubscription\". Quota Id is set when the SKU has requiredQuotas parameter as the subscription does not belong to that quota. The \"NotAvailableForSubscription\" is related to capacity at DC.") enum ReasonCode { QuotaId, NotAvailableForSubscription, } +@doc("The type of extendedLocation.") enum ExtendedLocationTypes { EdgeZone, } +@doc("The identity type.") enum IdentityType { None, SystemAssigned, @@ -47,30 +53,36 @@ enum IdentityType { `SystemAssigned,UserAssigned`, } +@doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") enum AllowedCopyScope { PrivateLink, AAD, } +@doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") enum PublicNetworkAccess { Enabled, Disabled, } +@doc("The SAS expiration action. Can only be Log.") enum ExpirationAction { Log, } +@doc("Encryption key type to be used for the encryption service. 'Account' key type implies that an account-scoped encryption key will be used. 'Service' key type implies that a default service key is used.") enum KeyType { Service, Account, } +@doc("The encryption keySource (provider). Possible values (case-insensitive): Microsoft.Storage, Microsoft.Keyvault") enum KeySource { `Microsoft.Storage`, `Microsoft.Keyvault`, } +@doc("Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Possible values are any combination of Logging|Metrics|AzureServices (For example, \"Logging, Metrics\"), or None to bypass none of those traffics.") enum Bypass { None, Logging, @@ -78,6 +90,7 @@ enum Bypass { AzureServices, } +@doc("Gets the state of virtual network rule.") enum State { Provisioning, Deprovisioning, @@ -86,6 +99,7 @@ enum State { NetworkSourceDeleted, } +@doc("Indicates the directory service used. Note that this enum may be extended in the future.") enum DirectoryServiceOptions { None, AADDS, @@ -93,11 +107,13 @@ enum DirectoryServiceOptions { AADKERB, } +@doc("Specifies the Active Directory account type for Azure Storage.") enum AccountType { User, Computer, } +@doc("Default share permission for users using Kerberos authentication if RBAC role is not assigned.") enum DefaultSharePermission { None, StorageFileDataSmbShareReader, @@ -105,45 +121,53 @@ enum DefaultSharePermission { StorageFileDataSmbShareElevatedContributor, } +@doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") enum LargeFileSharesState { Disabled, Enabled, } +@doc("Routing Choice defines the kind of network routing opted by the user.") enum RoutingChoice { MicrosoftRouting, InternetRouting, } +@doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") enum MinimumTlsVersion { TLS1_0, TLS1_1, TLS1_2, } +@doc("The ImmutabilityPolicy state defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted.") enum AccountImmutabilityPolicyState { Unlocked, Locked, Disabled, } +@doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") enum DnsEndpointType { Standard, AzureDnsZone, } +@doc("The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable.") enum GeoReplicationStatus { Live, Bootstrap, Unavailable, } +@doc("The private endpoint connection status.") enum PrivateEndpointServiceConnectionStatus { Pending, Approved, Rejected, } +@doc("The current provisioning state.") enum PrivateEndpointConnectionProvisioningState { Succeeded, Creating, @@ -151,18 +175,21 @@ enum PrivateEndpointConnectionProvisioningState { Failed, } +@doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") enum BlobRestoreProgressStatus { InProgress, Complete, Failed, } +@doc("This property indicates the current sku conversion status.") enum SkuConversionStatus { InProgress, Succeeded, Failed, } +@doc("The signed services accessible with the account SAS. Possible values include: Blob (b), Queue (q), Table (t), File (f).") enum Services { b, q, @@ -170,12 +197,14 @@ enum Services { f, } +@doc("The signed resource types that are accessible with the account SAS. Service (s): Access to service-level APIs; Container (c): Access to container-level APIs; Object (o): Access to object-level APIs for blobs, queue messages, table entities, and files.") enum SignedResourceTypes { s, c, o, } +@doc("The signed permissions for the account SAS. Possible values include: Read (r), Write (w), Delete (d), List (l), Add (a), Create (c), Update (u) and Process (p).") enum Permissions { r, d, @@ -187,6 +216,7 @@ enum Permissions { p, } +@doc("The signed services accessible with the service SAS. Possible values include: Blob (b), Container (c), File (f), Share (s).") enum SignedResource { b, c, @@ -198,6 +228,7 @@ enum ManagementPolicyName { default, } +@doc("The valid value is Lifecycle") enum RuleType { Lifecycle, } @@ -206,25 +237,30 @@ enum BlobInventoryPolicyName { default, } +@doc("The valid value is Inventory") enum InventoryRuleType { Inventory, } +@doc("This is a required field, it specifies the format for the inventory files.") enum Format { Csv, Parquet, } +@doc("This is a required field. This field is used to schedule an inventory formation.") enum Schedule { Daily, Weekly, } +@doc("This is a required field. This field specifies the scope of the inventory created either at the blob or container level.") enum ObjectType { Blob, Container, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -232,11 +268,13 @@ enum CreatedByType { Key, } +@doc("The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault.") enum EncryptionScopeSource { `Microsoft.Storage`, `Microsoft.KeyVault`, } +@doc("The state of the encryption scope. Possible values (case-insensitive): Enabled, Disabled.") enum EncryptionScopeState { Enabled, Disabled, @@ -259,6 +297,7 @@ enum AllowedMethods { PATCH, } +@doc("Name of the policy. The valid value is AccessTimeTracking. This field is currently read only") enum Name { AccessTimeTracking, } @@ -267,11 +306,13 @@ enum ListContainersInclude { deleted, } +@doc("The lease status of the container.") enum LeaseStatus { Locked, Unlocked, } +@doc("Lease state of the container.") enum LeaseState { Available, Leased, @@ -280,27 +321,32 @@ enum LeaseState { Broken, } +@doc("Specifies whether the lease on a container is of infinite or fixed duration, only when the container is leased.") enum LeaseDuration { Infinite, Fixed, } +@doc("The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked.") enum ImmutabilityPolicyState { Locked, Unlocked, } +@doc("The ImmutabilityPolicy update type of a blob container, possible values include: put, lock and extend.") enum ImmutabilityPolicyUpdateType { put, lock, extend, } +@doc("This property denotes the container level immutability to object level immutability migration state.") enum MigrationState { InProgress, Completed, } +@doc("Specifies the lease action. Can be one of the available actions.") enum LeaseContainerRequestAction { Acquire, Renew, @@ -309,17 +355,20 @@ enum LeaseContainerRequestAction { Break, } +@doc("The authentication protocol that is used for the file share. Can only be specified when creating a share.") enum EnabledProtocols { SMB, NFS, } +@doc("The property is for NFS share only. The default is NoRootSquash.") enum RootSquashType { NoRootSquash, RootSquash, AllSquash, } +@doc("Access tier for specific share. GpV2 account can choose between TransactionOptimized (default), Hot, and Cool. FileStorage account can choose Premium.") enum ShareAccessTier { TransactionOptimized, Hot, @@ -327,6 +376,7 @@ enum ShareAccessTier { Premium, } +@doc("Specifies the lease action. Can be one of the available actions.") enum LeaseShareAction { Acquire, Renew, @@ -334,49 +384,66 @@ enum LeaseShareAction { Release, Break, } -@Azure.Core.fixed + +@doc("The SKU tier. This is based on the SKU name.") +@fixed enum SkuTier { Standard, Premium, } -@Azure.Core.fixed + +@doc("Gets the reason that a storage account name could not be used. The Reason element is only returned if NameAvailable is false.") +@fixed enum Reason { AccountNameInvalid, AlreadyExists, } -@Azure.Core.fixed + +@doc("Specifies the default action of allow or deny when no other rules match.") +@fixed enum DefaultAction { Allow, Deny, } -@Azure.Core.fixed + +@doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") +@fixed enum AccessTier { Hot, Cool, Premium, } -@Azure.Core.fixed + +@doc("Gets the status of the storage account at the time the operation was called.") +@fixed enum ProvisioningState { Creating, ResolvingDNS, Succeeded, } -@Azure.Core.fixed + +@doc("Gets the status indicating whether the primary location of the storage account is available or unavailable.") +@fixed enum AccountStatus { available, unavailable, } -@Azure.Core.fixed + +@fixed enum StorageAccountExpand { geoReplicationStats, blobRestoreStatus, } -@Azure.Core.fixed + +@doc("Permissions for the key -- read-only or full permissions.") +@fixed enum KeyPermission { Read, Full, } -@Azure.Core.fixed + +@doc("Gets the unit of measurement.") +@fixed enum UsageUnit { Count, Bytes, @@ -385,12 +452,16 @@ enum UsageUnit { CountsPerSecond, BytesPerSecond, } -@Azure.Core.fixed + +@doc("The protocol permitted for a request made with the account SAS.") +@fixed enum HttpProtocol { `https,http`, https, } -@Azure.Core.fixed + +@doc("Specifies whether data in the container may be accessed publicly and the level of access.") +@fixed enum PublicAccess { Container, Blob, @@ -595,17 +666,6 @@ model Identity { userAssignedIdentities?: Record; } -@doc("UserAssignedIdentity for the resource.") -model UserAssignedIdentity { - @doc("The principal ID of the identity.") - @visibility("read") - principalId?: string; - - @doc("The client ID of the identity.") - @visibility("read") - clientId?: string; -} - @doc("The parameters used to create the storage account.") model StorageAccountPropertiesCreateParameters { @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") @@ -1203,6 +1263,21 @@ model PrivateLinkServiceConnectionState { actionRequired?: string; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; +} + @doc("Blob restore status.") model BlobRestoreStatus { @doc("The status of blob restore progress. Possible values are: - InProgress: Indicates that blob restore is ongoing. - Complete: Indicates that blob restore has been completed successfully. - Failed: Indicates that blob restore is failed.") @@ -1262,6 +1337,94 @@ model StorageAccountSkuConversionStatus { endTime?: utcDateTime; } +@doc("The parameters that can be provided when updating the storage account properties.") +model StorageAccountUpdateParameters { + @doc("Gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value.") + sku?: Sku; + + @doc("Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in length than 128 characters and a value no greater in length than 256 characters.") + tags?: Record; + + @doc("The identity of the resource.") + identity?: Identity; + + @doc("The parameters used when updating a storage account.") + properties?: StorageAccountPropertiesUpdateParameters; + + @doc("Optional. Indicates the type of storage account. Currently only StorageV2 value supported by server.") + kind?: Kind; +} + +@doc("The parameters used when updating a storage account.") +model StorageAccountPropertiesUpdateParameters { + @doc("Custom domain assigned to the storage account by the user. Name is the CNAME source. Only one custom domain is supported per storage account at this time. To clear the existing custom domain, use an empty string for the custom domain name property.") + customDomain?: CustomDomain; + + @doc("Not applicable. Azure Storage encryption at rest is enabled by default for all storage accounts and cannot be disabled.") + encryption?: Encryption; + + @doc("SasPolicy assigned to the storage account.") + sasPolicy?: SasPolicy; + + @doc("KeyPolicy assigned to the storage account.") + keyPolicy?: KeyPolicy; + + @doc("Required for storage accounts where kind = BlobStorage. The access tier is used for billing. The 'Premium' access tier is the default value for premium block blobs storage account type and it cannot be changed for the premium block blobs storage account type.") + accessTier?: AccessTier; + + @doc("Provides the identity based authentication settings for Azure Files.") + azureFilesIdentityBasedAuthentication?: AzureFilesIdentityBasedAuthentication; + + @doc("Allows https traffic only to storage service if sets to true.") + @projectedName("json", "supportsHttpsTrafficOnly") + enableHttpsTrafficOnly?: boolean; + + @doc("Enables Secure File Transfer Protocol, if set to true") + @projectedName("json", "isSftpEnabled") + IsSftpEnabled?: boolean; + + @doc("Enables local users feature, if set to true") + @projectedName("json", "isLocalUserEnabled") + IsLocalUserEnabled?: boolean; + + @doc("Network rule set") + @projectedName("json", "networkAcls") + networkRuleSet?: NetworkRuleSet; + + @doc("Allow large file shares if sets to Enabled. It cannot be disabled once it is enabled.") + largeFileSharesState?: LargeFileSharesState; + + @doc("Maintains information about the network routing choice opted by the user for data transfer") + routingPreference?: RoutingPreference; + + @doc("Allow or disallow public access to all blobs or containers in the storage account. The default interpretation is true for this property.") + allowBlobPublicAccess?: boolean; + + @doc("Set the minimum TLS version to be permitted on requests to storage. The default interpretation is TLS 1.0 for this property.") + minimumTlsVersion?: MinimumTlsVersion; + + @doc("Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is null, which is equivalent to true.") + allowSharedKeyAccess?: boolean; + + @doc("Allow or disallow cross AAD tenant object replication. The default interpretation is true for this property.") + allowCrossTenantReplication?: boolean; + + @doc("A boolean flag which indicates whether the default authentication is OAuth or not. The default interpretation is false for this property.") + defaultToOAuthAuthentication?: boolean; + + @doc("Allow or disallow public network access to Storage Account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'.") + publicNetworkAccess?: PublicNetworkAccess; + + @doc("The property is immutable and can only be set to true at the account creation time. When set to true, it enables object level immutability for all the containers in the account by default.") + immutableStorageWithVersioning?: ImmutableStorageAccount; + + @doc("Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet.") + allowedCopyScope?: AllowedCopyScope; + + @doc("Allows you to specify the type of endpoint. Set this to AzureDNSZone to create a large number of accounts in a single subscription, which creates accounts in an Azure DNS Zone and the endpoint URL will have an alphanumeric DNS Zone identifier.") + dnsEndpointType?: DnsEndpointType; +} + @doc("Attributes of a deleted storage account.") model DeletedAccountProperties { @doc("Full resource id of the original storage account.") diff --git a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp index 186c177afd..3e80a78bdf 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-storage/tsp-output/routes.tsp @@ -1,9 +1,11 @@ import "@azure-tools/typespec-azure-core"; import "@typespec/rest"; import "./models.tsp"; +import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.ResourceManager; namespace Microsoft.Storage; diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp index 4898464a92..a9f84093aa 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/DictProperty.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Employee.tsp"; @@ -8,6 +9,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Test; @doc("A Test resource") @@ -25,6 +27,7 @@ model DictProperty is TrackedResource> { interface DictProperties { @doc("Get a Resource.") get is ArmResourceRead; + @doc("List resources by resource group") listByResourceGroup is ArmResourceListByParent; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp index eaa000d001..b5e091fb0d 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Employee.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; @@ -7,6 +8,7 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Test; @doc("A Test resource") @@ -23,14 +25,23 @@ model Employee is TrackedResource { interface Employees { @doc("Get a Employee") get is ArmResourceRead; + @doc("Create a Employee") - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdateAsync< + Employee, + BaseParameters, + ArmAsyncOperationHeader + >; + @doc("Update a Employee") - update is ArmResourcePatchSync; + update is ArmCustomPatchSync; + @doc("Delete a Employee") delete is ArmResourceDeleteSync; + @doc("List Employee resources by resource group") listByResourceGroup is ArmResourceListByParent; + @doc("List Employee resources by subscription ID") listBySubscription is ArmListBySubscription; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp index cb3c249484..d43b05622c 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/Enroll.tsp @@ -1,5 +1,6 @@ import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; +import "@typespec/openapi"; import "@typespec/rest"; import "./models.tsp"; import "./Employee.tsp"; @@ -8,13 +9,14 @@ using TypeSpec.Rest; using Azure.ResourceManager; using Azure.ResourceManager.Foundations; using TypeSpec.Http; +using TypeSpec.OpenAPI; namespace Microsoft.Test; @doc("A Test resource") @singleton("default") @parentResource(Employee) model Enroll is TrackedResource { - @key("default") + @key("enroll") @segment("enrolls") name: string; } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp index 1d1b58c248..c343b56788 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/main.tsp @@ -25,5 +25,6 @@ namespace Microsoft.Test; enum Versions { @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) @useDependency(Azure.Core.Versions.v1_0_Preview_1) + @doc("The 2023-10-12 API version.") v2023_10_12: "2023-10-12", } diff --git a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp index 5901ff64e6..d6ce0dd694 100644 --- a/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/arm-test/tsp-output/models.tsp @@ -5,21 +5,25 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Rest; using TypeSpec.Http; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; namespace Microsoft.Test; interface Operations extends Azure.ResourceManager.Operations {} +@doc("The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\"") enum Origin { user, system, `user,system`, } +@doc("Enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs.") enum ActionType { Internal, } +@doc("The provisioning state of a resource.") enum ProvisioningState { @doc("Resource has been created.") Succeeded, @doc("Resource creation failed.") Failed, @@ -30,6 +34,7 @@ enum ProvisioningState { @doc("The resource create request has been accepted") Accepted, } +@doc("The type of identity that created the resource.") enum CreatedByType { User, Application, @@ -53,6 +58,46 @@ model EmployeeProperties { provisioningState?: ProvisioningState; } +@doc("Common fields that are returned in the response for all Azure Resource Manager resources") +model Resource { + @doc("Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}") + @visibility("read") + id?: string; + + @doc("The name of the resource") + @visibility("read") + name?: string; + + @doc("The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"") + @visibility("read") + type?: string; + + @doc("Azure Resource Manager metadata containing createdBy and modifiedBy information.") + @visibility("read") + systemData?: SystemData; +} + +@doc("The type used for update operations of the Employee.") +model EmployeeUpdate { + @doc("Resource tags.") + tags?: Record; + + @doc("The updatable properties of the Employee.") + properties?: EmployeeUpdateProperties; +} + +@doc("The updatable properties of the Employee.") +model EmployeeUpdateProperties { + @doc("Age of employee") + age?: int32; + + @doc("City of employee") + city?: string; + + @doc("Profile of employee") + profile?: bytes; +} + @doc("Enroll properties") model EnrollProperties { @doc("Country of employee") diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp index 18a7f5cc73..e5066a7b78 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/main.tsp @@ -18,5 +18,6 @@ namespace Azure.Batch; @doc("The available API versions.") enum Versions { +@doc("The 2022-01-01.15.0 API version.") v2022_01_01.15.0: "2022-01-01.15.0", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp index 7e9cf9a9a9..e54a815a15 100644 --- a/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/batch/tsp-output/models.tsp @@ -8,12 +8,18 @@ using Azure.Core; namespace Azure.Batch; -@Azure.Core.fixed +@doc("The type of operating system (e.g. Windows or Linux) of the Image.") +@fixed enum OSType { @doc("The Linux operating system.") linux, @doc("The Windows operating system.") windows, } -@Azure.Core.fixed + +@doc(""" +Whether the Azure Batch service actively verifies that the Image is compatible +with the associated Compute Node agent SKU. +""") +@fixed enum VerificationType { @doc(""" The Image is guaranteed to be compatible with the associated Compute Node agent @@ -26,7 +32,9 @@ Image, but specific functionality has not been verified. """) unverified, } -@Azure.Core.fixed + +@doc("The state of the Certificate.") +@fixed enum CertificateState { @doc("The Certificate is available for use in Pools.") active, @doc(""" @@ -46,13 +54,17 @@ the delete. """) deleteFailed: "deletefailed", } -@Azure.Core.fixed + +@doc("The format of the Certificate data.") +@fixed enum CertificateFormat { @doc("The Certificate is a PFX (PKCS#12) formatted Certificate or Certificate chain.") pfx, @doc("The Certificate is a base64-encoded X.509 Certificate.") cer, } -@Azure.Core.fixed + +@doc("The state of the Job Schedule.") +@fixed enum JobScheduleState { @doc("The Job Schedule is active and will create Jobs as per its schedule.") active, @@ -82,7 +94,12 @@ all Jobs and Tasks under the Job Schedule have been deleted. """) deleting, } -@Azure.Core.fixed + +@doc(""" +The action the Batch service should take when all Tasks in the Job are in the +completed state. +""") +@fixed enum OnAllTasksComplete { @doc(""" Do nothing. The Job remains active unless terminated or disabled by some other @@ -92,7 +109,14 @@ means. @doc("Terminate the Job. The Job's terminateReason is set to 'AllTasksComplete'.") terminateJob: "terminatejob", } -@Azure.Core.fixed + +@doc(""" +A Task is considered to have failed if has a failureInfo. A failureInfo is set +if the Task completes with a non-zero exit code after exhausting its retry +count, or if there was an error starting the Task, for example due to a +resource file download error. The default is noaction. +""") +@fixed enum OnTaskFailure { @doc(""" Do nothing. The Job remains active unless terminated or disabled by some other @@ -106,7 +130,9 @@ that is what the Task specifies.) """) performExitOptionsJobAction: "performexitoptionsjobaction", } -@Azure.Core.fixed + +@doc("The default is 'taskWorkingDirectory'.") +@fixed enum ContainerWorkingDirectory { @doc(""" Use the standard Batch service Task working directory, which will contain the @@ -119,7 +145,12 @@ directory will not contain the Resource Files downloaded by Batch. """) containerImageDefault, } -@Azure.Core.fixed + +@doc(""" +The conditions under which a Task output file or set of files should be +uploaded. +""") +@fixed enum OutputFileUploadCondition { @doc("Upload the file(s) only after the Task process exits with an exit code of 0.") taskSuccess: "tasksuccess", @@ -131,7 +162,15 @@ was. """) taskCompletion: "taskcompletion", } -@Azure.Core.fixed + +@doc(""" +The default value is pool. If the pool is running Windows a value of Task +should be specified if stricter isolation between tasks is required. For +example, if the task mutates the registry in a way which could impact other +tasks, or if certificates have been specified on the pool which should not be +accessible by normal tasks but should be accessible by StartTasks. +""") +@fixed enum AutoUserScope { @doc("Specifies that the service should create a new user for the Task.") task, @@ -141,7 +180,9 @@ on every Compute Node in a Pool. """) pool, } -@Azure.Core.fixed + +@doc("The elevation level of the user.") +@fixed enum ElevationLevel { @doc("The user is a standard user without elevated access.") nonAdmin: "nonadmin", @@ -151,7 +192,12 @@ permissions. """) admin, } -@Azure.Core.fixed + +@doc(""" +The minimum lifetime of created auto Pools, and how multiple Jobs on a schedule +are assigned to Pools. +""") +@fixed enum PoolLifetimeOption { @doc(""" The Pool exists for the lifetime of the Job Schedule. The Batch Service creates @@ -167,21 +213,31 @@ Job created on the schedule. """) job, } -@Azure.Core.fixed + +@doc(""" +The default value for caching is none. For information about the caching +options see: +https://blogs.msdn.microsoft.com/windowsazurestorage/2012/06/27/exploring-windows-azure-drives-disks-and-images/. +""") +@fixed enum CachingType { @doc("The caching mode for the disk is not enabled.") none, @doc("The caching mode for the disk is read only.") readOnly: "readonly", @doc("The caching mode for the disk is read and write.") readWrite: "readwrite", } -@Azure.Core.fixed + +@doc("The storage Account type for use in creating data disks.") +@fixed enum StorageAccountType { @doc("The data disk should use standard locally redundant storage.") StandardLRS: "standard_lrs", @doc("The data disk should use premium locally redundant storage.") PremiumLRS: "premium_lrs", } -@Azure.Core.fixed + +@doc("A disk to encrypt.") +@fixed enum DiskEncryptionTarget { @doc("The OS Disk on the compute node is encrypted.") OsDisk: "osdisk", @doc(""" @@ -191,7 +247,9 @@ encryption occurs at boot time. """) TemporaryDisk: "temporarydisk", } -@Azure.Core.fixed + +@doc("The default value is regional.") +@fixed enum NodePlacementPolicyType { @doc("All nodes in the pool will be allocated in the same region.") regional, @doc(""" @@ -200,7 +258,9 @@ effort balancing. """) zonal, } -@Azure.Core.fixed + +@doc("If not specified, the default is spread.") +@fixed enum ComputeNodeFillType { @doc("Tasks should be assigned evenly across all Compute Nodes in the Pool.") spread, @@ -211,22 +271,30 @@ Pool. """) pack, } -@Azure.Core.fixed + +@doc("The scope of dynamic vnet assignment.") +@fixed enum DynamicVNetAssignmentScope { @doc("No dynamic VNet assignment is enabled.") none, @doc("Dynamic VNet assignment is done per-job.") job, } -@Azure.Core.fixed + +@doc("The protocol of the endpoint.") +@fixed enum InboundEndpointProtocol { @doc("Use TCP for the endpoint.") tcp, @doc("Use UDP for the endpoint.") udp, } -@Azure.Core.fixed + +@doc("The action that should be taken for a specified IP address, subnet range or tag.") +@fixed enum NetworkSecurityGroupRuleAccess { @doc("Allow access.") allow, @doc("Deny access.") deny, } -@Azure.Core.fixed + +@doc("The provisioning type for Public IP Addresses for the Pool.") +@fixed enum IPAddressProvisioningType { @doc(""" A public IP will be created and managed by Batch. There may be multiple public @@ -241,14 +309,27 @@ Nodes. @doc("No public IP Address will be created.") noPublicIPAddresses: "nopublicipaddresses", } -@Azure.Core.fixed + +@doc(""" +The default value is currentuser. This property is applicable only for Pools +configured with Windows Compute Nodes (that is, created with +cloudServiceConfiguration, or with virtualMachineConfiguration using a Windows +Image reference). For Linux Compute Nodes, the Certificates are stored in a +directory inside the Task working directory and an environment variable +AZ_BATCH_CERTIFICATES_DIR is supplied to the Task to query for this location. +For Certificates with visibility of 'remoteUser', a 'certs' directory is +created in the user's home directory (e.g., /home/{user-name}/certs) and +Certificates are placed in that directory. +""") +@fixed enum CertificateStoreLocation { @doc("Certificates should be installed to the CurrentUser Certificate store.") currentUser: "currentuser", @doc("Certificates should be installed to the LocalMachine Certificate store.") localMachine: "localmachine", } -@Azure.Core.fixed + +@fixed enum CertificateVisibility { @doc(""" The Certificate should be visible to the user account under which the StartTask @@ -267,7 +348,12 @@ remotely access the Compute Node. """) remoteUser: "remoteuser", } -@Azure.Core.fixed + +@doc(""" +The default value for VirtualMachineConfiguration Pools is 'batch' and for +CloudServiceConfiguration Pools is 'interactive'. +""") +@fixed enum LoginMode { @doc(""" The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is recommended @@ -284,7 +370,9 @@ maximum privilege. """) interactive, } -@Azure.Core.fixed + +@doc("The state of the Job.") +@fixed enum JobState { @doc("The Job is available to have Tasks scheduled.") active, @doc(""" @@ -320,14 +408,18 @@ Tasks). """) deleting, } -@Azure.Core.fixed + +@doc("The category of the error.") +@fixed enum ErrorCategory { @doc("The error is due to a user issue, such as misconfiguration.") userError: "usererror", @doc("The error is due to an internal server issue.") serverError: "servererror", } -@Azure.Core.fixed + +@doc("What to do with active Tasks associated with the Job.") +@fixed enum DisableJobOption { @doc(""" Terminate running Tasks and requeue them. The Tasks will run again when the Job @@ -341,7 +433,9 @@ indicating that they were terminated, and will not run again. terminate, @doc("Allow currently running Tasks to complete.") wait, } -@Azure.Core.fixed + +@doc("The current state of the Job Preparation Task on the Compute Node.") +@fixed enum JobPreparationTaskState { @doc("The Task is currently running (including retrying).") running, @doc(""" @@ -351,7 +445,9 @@ preparation errors (such as resource file download failures). """) completed, } -@Azure.Core.fixed + +@doc("The result of Task execution.") +@fixed enum TaskExecutionResult { @doc("The Task ran successfully.") success, @doc(""" @@ -361,7 +457,9 @@ after the Task process exited. """) failure, } -@Azure.Core.fixed + +@doc("The current state of the Job Release Task on the Compute Node.") +@fixed enum JobReleaseTaskState { @doc("The Task is currently running (including retrying).") running, @doc(""" @@ -371,7 +469,9 @@ preparation errors (such as resource file download failures). """) completed, } -@Azure.Core.fixed + +@doc("The current state of the Pool.") +@fixed enum PoolState { @doc("The Pool is available to run Tasks subject to the availability of Compute Nodes.") active, @@ -381,7 +481,9 @@ not yet completed. """) deleting, } -@Azure.Core.fixed + +@doc("Whether the Pool is resizing.") +@fixed enum AllocationState { @doc(""" The Pool is not resizing. There are no changes to the number of Compute Nodes @@ -401,7 +503,13 @@ but the stop request has not yet been completed. """) stopping, } -@Azure.Core.fixed + +@doc(""" +The list of user identities associated with the Batch pool. The user identity +dictionary key references will be ARM resource ids in the form: +'/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. +""") +@fixed enum PoolIdentityType { @doc("Batch pool has user assigned identities with it.") UserAssigned, @doc(""" @@ -410,7 +518,9 @@ will remove existing identities. """) None, } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum ComputeNodeDeallocationOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks will run @@ -436,7 +546,15 @@ Compute Nodes when all Task retention periods have expired. """) retainedData: "retaineddata", } -@Azure.Core.fixed + +@doc(""" +The default is none for exit code 0 and terminate for all other exit +conditions. If the Job's onTaskFailed property is noaction, then specifying +this property returns an error and the add Task request fails with an invalid +property value error; if you are calling the REST API directly, the HTTP status +code is 400 (Bad Request). +""") +@fixed enum JobAction { @doc("Take no action.") none, @doc(""" @@ -450,7 +568,13 @@ Terminate the Job. The terminateReason in the Job's executionInfo is set to """) terminate, } -@Azure.Core.fixed + +@doc(""" +Possible values are 'satisfy' (allowing dependent tasks to progress) and +'block' (dependent tasks continue to wait). Batch does not yet support +cancellation of dependent tasks. +""") +@fixed enum DependencyAction { @doc(""" Satisfy tasks waiting on this task; once all dependencies are satisfied, the @@ -460,7 +584,9 @@ task will be scheduled to run. @doc("Blocks tasks waiting on this task, preventing them from being scheduled.") block, } -@Azure.Core.fixed + +@doc("The state of the Task.") +@fixed enum TaskState { @doc(""" The Task is queued and able to run, but is not currently assigned to a Compute @@ -491,7 +617,9 @@ the Task, or when the Task has been terminated. """) completed, } -@Azure.Core.fixed + +@doc("The status of the add Task request.") +@fixed enum TaskAddStatus { @doc("The Task was added successfully.") success, @doc(""" @@ -505,7 +633,9 @@ modification. """) serverError: "servererror", } -@Azure.Core.fixed + +@doc("The state of the subtask.") +@fixed enum SubtaskState { @doc(""" The Task has been assigned to a Compute Node, but is waiting for a required Job @@ -530,7 +660,13 @@ the Task, or when the Task has been terminated. """) completed, } -@Azure.Core.fixed + +@doc(""" +The Spot/Low-priority Compute Node has been preempted. Tasks which were running +on the Compute Node when it was preempted will be rescheduled when another +Compute Node becomes available. +""") +@fixed enum ComputeNodeState { @doc("The Compute Node is not currently running a Task.") idle, @doc("The Compute Node is rebooting.") rebooting, @@ -578,7 +714,9 @@ Compute Node becomes available. """) preempted, } -@Azure.Core.fixed + +@doc("Whether the Compute Node is available for Task scheduling.") +@fixed enum SchedulingState { @doc("Tasks can be scheduled on the Compute Node.") enabled, @doc(""" @@ -588,7 +726,9 @@ scheduling enabled. """) disabled, } -@Azure.Core.fixed + +@doc("The state of the StartTask on the Compute Node.") +@fixed enum StartTaskState { @doc("The StartTask is currently running.") running, @doc(""" @@ -598,7 +738,9 @@ preparation errors (such as resource file download failures). """) completed, } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum ComputeNodeRebootOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks will run @@ -624,7 +766,9 @@ Compute Node when all Task retention periods have expired. """) retainedData: "retaineddata", } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum ComputeNodeReimageOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks will run @@ -650,7 +794,9 @@ Compute Node when all Task retention periods have expired. """) retainedData: "retaineddata", } -@Azure.Core.fixed + +@doc("The default value is requeue.") +@fixed enum DisableComputeNodeSchedulingOption { @doc(""" Terminate running Task processes and requeue the Tasks. The Tasks may run again @@ -670,7 +816,9 @@ Enter offline state when all Tasks have completed. """) taskCompletion: "taskcompletion", } -@Azure.Core.fixed + +@doc("Level code.") +@fixed enum StatusLevelTypes { Error, Info, diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp index 5f30f5188a..53f9865cb2 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace AutoRestComplexTestService; @doc("The available API versions.") enum Versions { + @doc("The 2016-02-29 API version.") v2016_02_29: "2016-02-29", } diff --git a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp index ae9bf222bc..8ec0f9b6f6 100644 --- a/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/bodyComplex/tsp-output/models.tsp @@ -17,6 +17,7 @@ enum MyKind { Kind1, } +@doc("Colors possible") enum GoblinSharkColor { pink, gray, diff --git a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp index d5ef1a9d2f..475c207f76 100644 --- a/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/complexObject/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace ComplexModelClient; @doc("The available API versions.") enum Versions { + @doc("The 2014-04-01-preview API version.") v2014_04_01_preview: "2014-04-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp index 31c64b5e6a..3170808c3b 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace Azure.Language.Authoring; @doc("The available API versions.") enum Versions { + @doc("The 2022-05-13 API version.") v2022_05_13: "2022-05-13", } diff --git a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp index cc98d46f19..8101be0b57 100644 --- a/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/confidentialLedger/tsp-output/models.tsp @@ -8,16 +8,19 @@ using Azure.Core; namespace Azure.Language.Authoring; +@doc("State of a ledger query.") enum ConfidentialLedgerQueryState { Loading, Ready, } +@doc("Represents the state of the transaction.") enum TransactionState { Committed, Pending, } +@doc("Represents an assignable role.") enum ConfidentialLedgerUserRoleName { Administrator, Contributor, diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp index 5b3bc572e7..2fc600be68 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/main.tsp @@ -21,5 +21,6 @@ namespace Azure.Keyvault; @doc("The available API versions.") enum Versions { +@doc("The 7.4-preview.1 API version.") v7.4_preview.1: "7.4-preview.1", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp index 384b30e806..634ecd206b 100644 --- a/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/keyvault/tsp-output/models.tsp @@ -4,9 +4,16 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.Core; namespace Azure.Keyvault; +@doc(""" +Reflects the deletion recovery level currently in effect for certificates in +the current vault. If it contains 'Purgeable', the certificate can be +permanently deleted by a privileged user; otherwise, only the system can purge +the certificate, at the end of the retention interval. +""") enum DeletionRecoveryLevel { @doc(""" Denotes a vault state in which deletion is an irreversible operation, without @@ -66,6 +73,10 @@ the subscription itself cannot be cancelled. `CustomizedRecoverable+ProtectedSubscription`, } +@doc(""" +JsonWebKey Key Type (kty), as defined in +https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40. +""") enum JsonWebKeyType { @doc("Elliptic Curve.") EC, @doc("Elliptic Curve with a private key which is stored in the HSM.") @@ -83,6 +94,7 @@ is stored in the HSM. `OKP-HSM`, } +@doc("Elliptic curve name. For valid values, see JsonWebKeyCurveName.") enum JsonWebKeyCurveName { @doc("The NIST P-256 elliptic curve, AKA SECG curve SECP256R1.") `P-256`, @doc("The NIST P-384 elliptic curve, AKA SECG curve SECP384R1.") `P-384`, @@ -103,6 +115,7 @@ enum KeyUsageType { decipherOnly, } +@doc("JSON web key operations. For more information, see JsonWebKeyOperation.") enum JsonWebKeyOperation { encrypt, decrypt, @@ -114,6 +127,7 @@ enum JsonWebKeyOperation { export, } +@doc("algorithm identifier") enum JsonWebKeyEncryptionAlgorithm { `RSA-OAEP`, `RSA-OAEP-256`, @@ -132,6 +146,10 @@ enum JsonWebKeyEncryptionAlgorithm { A256CBCPAD, } +@doc(""" +The signing/verification algorithm identifier. For more information on possible +algorithm types, see JsonWebKeySignatureAlgorithm. +""") enum JsonWebKeySignatureAlgorithm { @doc(""" RSASSA-PSS using SHA-256 and MGF1 with SHA-256, as described in @@ -191,21 +209,25 @@ https://tools.ietf.org/html/rfc8032. EdDSA, } +@doc("The encryption algorithm to use to protected the exported key material") enum KeyEncryptionAlgorithm { CKM_RSA_AES_KEY_WRAP, RSA_AES_KEY_WRAP_256, RSA_AES_KEY_WRAP_384, } +@doc("The role definition type.") enum RoleDefinitionType { `Microsoft.Authorization/roleDefinitions`, } +@doc("The role type.") enum RoleType { @doc("Built in role.") BuiltInRole: "AKVBuiltInRole", @doc("Custom role.") CustomRole, } +@doc("Supported permissions for data actions.") enum DataAction { @doc("Read HSM key metadata.") ReadHsmKey: "Microsoft.KeyVault/managedHsm/keys/read/action", @@ -277,27 +299,34 @@ enum DataAction { RandomNumbersGenerate: "Microsoft.KeyVault/managedHsm/rng/action", } +@doc("The role scope.") enum RoleScope { @doc("Global scope") Global: "/", @doc("Keys scope") Keys: "/keys", } +@doc("The type specifier of the value.") enum SettingTypeEnum { boolean, } +@doc("The type of SAS token the SAS definition will create.") enum SasTokenType { account, service, } -@Azure.Core.fixed + +@doc("The type of the action.") +@fixed enum ActionType { EmailContacts, AutoRenew, rotate, notify, } -@Azure.Core.fixed + +@doc("operation status") +@fixed enum OperationStatus { Success, InProgress, diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp index cf823fdd7c..5ec17b8388 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace Azure.LoadTesting; @doc("The available API versions.") enum Versions { + @doc("The 2022-11-01 API version.") v2022_11_01: "2022-11-01", } diff --git a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp index 84e335b446..7250f5dcb8 100644 --- a/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/loadTest/tsp-output/models.tsp @@ -7,6 +7,7 @@ using TypeSpec.Http; namespace Azure.LoadTesting; +@doc("The client metric on which the criteria should be applied.") enum PFMetrics { @doc("Pass fail criteria for response time metric") response_time_ms, @doc("Pass fail criteria for response time metric") latency, @@ -15,6 +16,12 @@ enum PFMetrics { @doc("Pass fail criteria for request rate.") requests_per_sec, } +@doc(""" +The aggregation function to be applied on the client metric. Allowed functions +- ‘percentage’ - for error metric , ‘avg’, ‘p50’, ‘p90’, ‘p95’, ‘p99’, ‘min’, +‘max’ - for response_time_ms and latency metric, ‘avg’ - for requests_per_sec, +‘count’ - for requests +""") enum PFAgFunc { @doc("Criteria applies for count value") count, @doc("Criteria applies for given percentage value") percentage, @@ -27,33 +34,39 @@ enum PFAgFunc { @doc("Criteria applies for maximum value") max, } +@doc("Action taken after the threshold is met. Default is ‘continue’.") enum PFAction { @doc("Test will continue to run even if pass fail metric criteria metric gets failed") continue, @doc("Test run will stop if pass fail criteria metric is not passed.") stop, } +@doc("Outcome of the test run.") enum PFResult { @doc("Given pass fail criteria metric has passed.") passed, @doc("Given pass fail criteria metric couldn't determine.") undetermined, @doc("Given pass fail criteria metric has failed.") failed, } +@doc("Type of secret") enum SecretType { @doc("If the secret is stored in an Azure Key Vault") AKV_SECRET_URI, @doc("If the Plain text secret value provided") SECRET_VALUE, } +@doc("Type of certificate") enum CertificateType { @doc("If the certificate is stored in an Azure Key Vault") AKV_CERT_URI, } +@doc("File type") enum FileType { @doc("If file is jmx script") JMX_FILE, @doc("If file is user properties") USER_PROPERTIES, @doc("If file is not any of other supported type") ADDITIONAL_ARTIFACTS, } +@doc("Validation status of the file") enum FileStatus { @doc("File is not validated.") NOT_VALIDATED, @doc("File is validated.") VALIDATION_SUCCESS, @@ -62,12 +75,14 @@ enum FileStatus { @doc("Validation is not required.") VALIDATION_NOT_REQUIRED, } +@doc("Test result for pass/Fail criteria used during the test run.") enum PFTestResult { @doc("Pass/fail criteria has passed.") PASSED, @doc("Pass/fail criteria is not applicable.") NOT_APPLICABLE, @doc("Pass/fail criteria has failed.") FAILED, } +@doc("The test run status.") enum Status { @doc("Test run request is accepted") ACCEPTED, @doc("Test run is not yet started.") NOTSTARTED, @@ -87,6 +102,7 @@ enum Status { @doc("Test run JMX file validation is failed") VALIDATION_FAILURE, } +@doc("The primary aggregation type value defining how to use the values for display.") enum AggregationType { @doc("Average value") Average, @doc("Total count") Count, @@ -97,6 +113,7 @@ enum AggregationType { @doc("99th percentile") Percentile99, } +@doc("The unit of the metric.") enum MetricUnit { @doc("No unit specified") NotSpecified, @doc("Percentage") Percent, @@ -108,6 +125,10 @@ enum MetricUnit { @doc("Count per second") CountPerSecond, } +@doc(""" +The time grain specifies the aggregation interval for the metric. Expressed as +a duration 'PT1M', 'PT1H', etc. +""") enum TimeGrain { @doc("5 seconds, available only if test run duration is less than 10 minutes") PT5S, diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp index ca739032c5..0aa97bc4cb 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace NotificationHubsClient; @doc("The available API versions.") enum Versions { + @doc("The 2020-06-01 API version.") v2020_06_01: "2020-06-01", } diff --git a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp index c79f352922..987d254576 100644 --- a/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/nh/tsp-output/models.tsp @@ -35,6 +35,7 @@ enum RegistrationEntryModelXmlnsM { `http://schemas.microsoft.com/ado/2007/08/dataservices/metadata`, } +@doc("PNS Platform for the installation") enum PlatformType { apns, wns, @@ -99,7 +100,9 @@ enum ApiVersionType { `2016-07`, `2020-06`, } -@Azure.Core.fixed + +@doc("Content type for upload") +@fixed enum ContentType { @doc("Content Type 'application/json;charset=utf-8'") `application/json;charset=utf-8`, diff --git a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp index aa73e0bfe5..ed3b6b8d22 100644 --- a/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/openAI/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace Azure.AI.OpenAI; @doc("The available API versions.") enum Versions { + @doc("The 2022-06-01-preview API version.") v2022_06_01_preview: "2022-06-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp index 1bed7b99c8..ac952c6c97 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/main.tsp @@ -18,5 +18,6 @@ namespace AutoRestPagingTestService; @doc("The available API versions.") enum Versions { +@doc("The 1.0.0 API version.") v1.0.0: "1.0.0", } \ No newline at end of file diff --git a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp index e02ec88ae1..40a4ef87d6 100644 --- a/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/pagination/tsp-output/models.tsp @@ -8,6 +8,7 @@ using Azure.Core; namespace AutoRestPagingTestService; +@doc("The status of the request") enum OperationResultStatus { Succeeded, Failed, diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp index aa4d487744..27b7cddfe2 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/main.tsp @@ -27,5 +27,6 @@ namespace Azure.Language.QnAMaker; @doc("The available API versions.") enum Versions { + @doc("The 2022-07-01-preview API version.") v2022_07_01_preview: "2022-07-01-preview", } diff --git a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp index 33ff6ee6f3..cecc5cc1c6 100644 --- a/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qna/tsp-output/models.tsp @@ -6,16 +6,19 @@ using TypeSpec.Http; namespace Azure.Language.QnAMaker; +@doc("Type of ranker to be used.") enum RankerKind { @doc("Question only ranker.") QuestionOnly, @doc("Default ranker.") Default, } +@doc("Set to 'OR' or 'AND' for using corresponding logical operation.") enum LogicalOperationKind { AND, OR, } +@doc("Human-readable error code.") enum ErrorCode { InvalidRequest, InvalidArgument, @@ -37,6 +40,7 @@ enum ErrorCode { Warning, } +@doc("Human-readable error code.") enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -54,6 +58,11 @@ enum InnerErrorCode { InvalidCountryHint, } +@doc(""" +Specifies the method used to interpret string offsets. Defaults to Text +Elements (Graphemes) according to Unicode v8.0.0. For additional information +see https://aka.ms/text-analytics-offsets. +""") enum StringIndexType { @doc(""" Returned offset and length values will correspond to TextElements (Graphemes diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp index ed4bda7e45..374dfef5ea 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/main.tsp @@ -27,5 +27,6 @@ namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; @doc("The available API versions.") enum Versions { + @doc("The 2023-04-01 API version.") v2023_04_01: "2023-04-01", } diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp index 438a65866d..a3edfc665a 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/models.tsp @@ -7,6 +7,7 @@ using TypeSpec.Http; namespace MicrosoftCognitiveLanguageServiceQuestionAnsweringAuthoring; +@doc("Human-readable error code.") enum ErrorCode { InvalidRequest, InvalidArgument, @@ -28,6 +29,7 @@ enum ErrorCode { Warning, } +@doc("Human-readable error code.") enum InnerErrorCode { InvalidRequest, InvalidParameterValue, @@ -45,6 +47,7 @@ enum InnerErrorCode { InvalidCountryHint, } +@doc("Job Status.") enum JobStatus { notStarted, running, @@ -74,15 +77,18 @@ enum AssetKind { synonyms, } +@doc("Supported source types.") enum SourceKind { file, url, } +@doc("Content structure type for sources.") enum SourceContentStructureKind { unstructured, } +@doc("Update operation type for assets.") enum UpdateOperationKind { add, delete, diff --git a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp index acff066479..3df4e93955 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaAuthoring/tsp-output/routes.tsp @@ -101,7 +101,7 @@ interface QuestionAnsweringProjectsOperations { @doc("Knowledge base Import or Export format.") @query("format") - format?: Format = "json"; + format?: Format = Format.json; @doc("Kind of the asset of the project.") @query("assetKind") @@ -147,7 +147,7 @@ metadata, and assets. @doc("Knowledge base Import or Export format.") @query("format") - format?: Format = "json"; + format?: Format = Format.json; @doc("Kind of the asset of the project.") @query("assetKind") diff --git a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp index 5c994f9401..8d6391c095 100644 --- a/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/qnaRuntime/tsp-output/models.tsp @@ -6,11 +6,13 @@ using TypeSpec.Http; namespace QnAMakerRuntimeClient; +@doc("Optional field. Set to OR for using OR as Operation for Strict Filters.") enum StrictFiltersCompoundOperationType { AND, OR, } +@doc("Human readable error code.") enum ErrorCodeType { BadArgument, Forbidden, diff --git a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp index a20ddac094..a3a21efaa9 100644 --- a/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/schemaRegistry/tsp-output/main.tsp @@ -23,5 +23,6 @@ namespace AzureSchemaRegistry; @doc("The available API versions.") enum Versions { + @doc("The 2021-10 API version.") v2021_10: "2021-10", } diff --git a/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp index 19b5d3f384..524e1c45b9 100644 --- a/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/url/tsp-output/models.tsp @@ -4,10 +4,11 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.Core; namespace AutoRestUrlTestService; -@Azure.Core.fixed +@fixed enum UriColor { `red color`, `green color`, diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp index aeb92da4b1..98adb3564b 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/main.tsp @@ -20,5 +20,6 @@ namespace AzureWebPubSubServiceRESTAPI; @doc("The available API versions.") enum Versions { + @doc("The 2023-07-01 API version.") v2023_07_01: "2023-07-01", } diff --git a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp index 82a59a520d..f489190525 100644 --- a/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp +++ b/packages/extensions/openapi-to-typespec/test/webpubsub/tsp-output/models.tsp @@ -4,6 +4,7 @@ import "@azure-tools/typespec-azure-core"; using TypeSpec.Rest; using TypeSpec.Http; +using Azure.Core; namespace AzureWebPubSubServiceRESTAPI; @@ -11,7 +12,9 @@ enum WebPubSubPermission { sendToGroup, joinLeaveGroup, } -@Azure.Core.fixed + +@doc("Content type for upload") +@fixed enum ContentType { @doc("Content Type 'application/json'") `application/json`, @doc("Content Type 'application/octet-stream'") `application/octet-stream`,