From f49c33c49e3bdb7c640bb928a8107d454ce1581a Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 24 Sep 2024 19:50:09 +0000 Subject: [PATCH] CodeGen from PR 30661 in Azure/azure-rest-api-specs Merge 52dcdccd3de7284ecb2a3e8ac573dfb9586e44d6 into 4966173017792911c6e17420208029269b945ef7 --- common/config/rush/pnpm-lock.yaml | 39 +- sdk/appservice/arm-appservice/CHANGELOG.md | 48 +- sdk/appservice/arm-appservice/_meta.json | 8 +- sdk/appservice/arm-appservice/package.json | 20 +- .../review/arm-appservice.api.md | 120 ++- .../arm-appservice/src/models/index.ts | 149 +++- .../arm-appservice/src/models/mappers.ts | 68 ++ .../arm-appservice/src/models/parameters.ts | 44 +- .../arm-appservice/src/operations/index.ts | 3 +- .../src/operations/siteCertificates.ts | 767 ++++++++++++++++++ .../arm-appservice/src/operations/webApps.ts | 42 + .../src/operationsInterfaces/index.ts | 3 +- .../operationsInterfaces/siteCertificates.ts | 183 +++++ .../src/operationsInterfaces/webApps.ts | 13 + .../src/webSiteManagementClient.ts | 16 +- .../arm-appservice/test/sampleTest.ts | 43 + sdk/appservice/arm-appservice/tsconfig.json | 10 +- 17 files changed, 1509 insertions(+), 67 deletions(-) create mode 100644 sdk/appservice/arm-appservice/src/operations/siteCertificates.ts create mode 100644 sdk/appservice/arm-appservice/src/operationsInterfaces/siteCertificates.ts create mode 100644 sdk/appservice/arm-appservice/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 07a389eaa442..5798495765bc 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10488,6 +10488,37 @@ packages: yn: 3.1.1 dev: false + /ts-node@10.9.2(@types/node@18.19.50)(typescript@5.5.4): + resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.11 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 18.19.50 + acorn: 8.12.1 + acorn-walk: 8.3.4 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.5.4 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@10.9.2(@types/node@18.19.50)(typescript@5.6.2): resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} hasBin: true @@ -12606,7 +12637,7 @@ packages: dev: false file:projects/arm-appservice-1.tgz: - resolution: {integrity: sha512-mTPkB0S2WMTWFivB6kmxsh3KpkaGZTEn99uOXf1Di7nY/CwIHJpBG8ki32zxFKMrvdHtJjJWkLqhxgqkTEvvew==, tarball: file:projects/arm-appservice-1.tgz} + resolution: {integrity: sha512-amfwCiVShLMaHhfwptTfDfPw0+pDGiD9OAn900ef8xX9OW+kqk4cNNdZh4KTwHFtkHPfrC3C2WN45FBEUi8qug==, tarball: file:projects/arm-appservice-1.tgz} name: '@rush-temp/arm-appservice-1' version: 0.0.0 dependencies: @@ -12625,10 +12656,10 @@ packages: mkdirp: 3.0.1 mocha: 10.7.3 rimraf: 5.0.10 - ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.6.2) + ts-node: 10.9.2(@types/node@18.19.50)(typescript@5.5.4) tslib: 2.7.0 tsx: 4.19.1 - typescript: 5.6.2 + typescript: 5.5.4 uglify-js: 3.19.3 transitivePeerDependencies: - '@swc/core' @@ -13742,7 +13773,7 @@ packages: dev: false file:projects/arm-containerservice-1.tgz: - resolution: {integrity: sha512-Wl42MhvqkSN9qt7aI2dq9MoSjUPhKs9Vd7ph4z1NDv/4+Tr5TThGfXEcF6li2/uyM/oej6wCchIOXcN+x5t8Ug==, tarball: file:projects/arm-containerservice-1.tgz} + resolution: {integrity: sha512-giEQbgQSPKX5IztgAepOuRLfULJTB4rv9RXCMFBYOh9cAjTSCfDW5HXmQ9KyPDtFJ1XAEtWRzIcIqEb+93rJ1A==, tarball: file:projects/arm-containerservice-1.tgz} name: '@rush-temp/arm-containerservice-1' version: 0.0.0 dependencies: diff --git a/sdk/appservice/arm-appservice/CHANGELOG.md b/sdk/appservice/arm-appservice/CHANGELOG.md index 13462b727975..dfb1bef0d9e7 100644 --- a/sdk/appservice/arm-appservice/CHANGELOG.md +++ b/sdk/appservice/arm-appservice/CHANGELOG.md @@ -1,15 +1,45 @@ # Release History - -## 15.0.1 (Unreleased) - + +## 15.1.0 (2024-09-24) + ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added operation group SiteCertificates + - Added operation WebApps.updateMachineKey + - Added Interface CipherSuites + - Added Interface SiteCertificatesCreateOrUpdateOptionalParams + - Added Interface SiteCertificatesCreateOrUpdateSlotOptionalParams + - Added Interface SiteCertificatesDeleteOptionalParams + - Added Interface SiteCertificatesDeleteSlotOptionalParams + - Added Interface SiteCertificatesGetOptionalParams + - Added Interface SiteCertificatesGetSlotOptionalParams + - Added Interface SiteCertificatesListNextOptionalParams + - Added Interface SiteCertificatesListOptionalParams + - Added Interface SiteCertificatesListSlotNextOptionalParams + - Added Interface SiteCertificatesListSlotOptionalParams + - Added Interface SiteCertificatesUpdateOptionalParams + - Added Interface SiteCertificatesUpdateSlotOptionalParams + - Added Interface WebAppsUpdateMachineKeyOptionalParams + - Added Type Alias AutoGeneratedDomainNameLabelScope + - Added Type Alias IPMode + - Added Type Alias SiteCertificatesCreateOrUpdateResponse + - Added Type Alias SiteCertificatesCreateOrUpdateSlotResponse + - Added Type Alias SiteCertificatesGetResponse + - Added Type Alias SiteCertificatesGetSlotResponse + - Added Type Alias SiteCertificatesListNextResponse + - Added Type Alias SiteCertificatesListResponse + - Added Type Alias SiteCertificatesListSlotNextResponse + - Added Type Alias SiteCertificatesListSlotResponse + - Added Type Alias SiteCertificatesUpdateResponse + - Added Type Alias SiteCertificatesUpdateSlotResponse + - Added Type Alias WebAppsUpdateMachineKeyResponse + - Interface Site has a new optional parameter autoGeneratedDomainNameLabelScope + - Interface Site has a new optional parameter endToEndEncryptionEnabled + - Interface Site has a new optional parameter ipMode + - Interface Site has a new optional parameter sku + - Interface WebSiteInstanceStatus has a new optional parameter physicalZone + + ## 15.0.0 (2024-06-11) ### Features Added diff --git a/sdk/appservice/arm-appservice/_meta.json b/sdk/appservice/arm-appservice/_meta.json index cc1c202d06c6..3c153943831d 100644 --- a/sdk/appservice/arm-appservice/_meta.json +++ b/sdk/appservice/arm-appservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "e9f47ec88eb06646c53f2a561f3b27434ac5ac57", + "commit": "20c5d682c5da5369918e6b3ffe21f7e1995a74de", "readme": "specification/web/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\web\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/web/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.9", - "use": "@autorest/typescript@6.0.23" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.14", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/appservice/arm-appservice/package.json b/sdk/appservice/arm-appservice/package.json index 19fc17b58716..21f610210123 100644 --- a/sdk/appservice/arm-appservice/package.json +++ b/sdk/appservice/arm-appservice/package.json @@ -3,13 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for WebSiteManagementClient.", - "version": "15.0.1", + "version": "15.1.0", "engines": { "node": ">=18.0.0" }, "dependencies": { "@azure/core-lro": "^2.5.4", - "@azure/abort-controller": "^1.0.0", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.6.0", @@ -30,12 +30,12 @@ "devDependencies": { "@microsoft/api-extractor": "^7.31.1", "mkdirp": "^3.0.1", - "typescript": "~5.6.2", + "typescript": "~5.5.3", "uglify-js": "^3.4.9", "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", + "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", "mocha": "^10.0.0", @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appservice/arm-appservice", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-appservice?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/appservice/arm-appservice" +} \ No newline at end of file diff --git a/sdk/appservice/arm-appservice/review/arm-appservice.api.md b/sdk/appservice/arm-appservice/review/arm-appservice.api.md index d370c17b072c..a93384f4cb29 100644 --- a/sdk/appservice/arm-appservice/review/arm-appservice.api.md +++ b/sdk/appservice/arm-appservice/review/arm-appservice.api.md @@ -1471,6 +1471,9 @@ export interface AuthPlatform { // @public export type AuthType = "Anonymous" | "UserCredentials" | "SystemIdentity" | "UserAssigned"; +// @public +export type AutoGeneratedDomainNameLabelScope = "TenantReuse" | "SubscriptionReuse" | "ResourceGroupReuse" | "NoReuse"; + // @public export interface AutoHealActions { actionType?: AutoHealActionType; @@ -1919,6 +1922,11 @@ export type CheckNameAvailabilityResponse = ResourceNameAvailability; // @public export type CheckNameResourceTypes = string; +// @public +export interface CipherSuites { + suites?: string[]; +} + // @public export type ClientCertMode = "Required" | "Optional" | "OptionalInteractiveUser"; @@ -4059,6 +4067,9 @@ export interface IpAddressRange { // @public export type IpFilterTag = string; +// @public +export type IPMode = "IPv4" | "IPv6" | "IPv4AndIPv6"; + // @public export interface IpSecurityRestriction { action?: string; @@ -6189,6 +6200,7 @@ export interface ServiceSpecification { // @public export interface Site extends Resource { + autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; readonly availabilityState?: SiteAvailabilityState; clientAffinityEnabled?: boolean; clientCertEnabled?: boolean; @@ -6203,6 +6215,7 @@ export interface Site extends Resource { dnsConfiguration?: SiteDnsConfig; enabled?: boolean; readonly enabledHostNames?: string[]; + endToEndEncryptionEnabled?: boolean; extendedLocation?: ExtendedLocation; functionAppConfig?: FunctionAppConfig; hostingEnvironmentProfile?: HostingEnvironmentProfile; @@ -6213,6 +6226,7 @@ export interface Site extends Resource { hyperV?: boolean; identity?: ManagedServiceIdentity; readonly inProgressOperationId?: string; + ipMode?: IPMode; readonly isDefaultContainer?: boolean; isXenon?: boolean; keyVaultReferenceIdentity?: string; @@ -6230,6 +6244,7 @@ export interface Site extends Resource { scmSiteAlsoStopped?: boolean; serverFarmId?: string; siteConfig?: SiteConfig; + readonly sku?: string; readonly slotSwapStatus?: SlotSwapStatus; readonly state?: string; storageAccountRequired?: boolean; @@ -6299,6 +6314,98 @@ export interface SiteAuthSettingsV2 extends ProxyOnlyResource { // @public export type SiteAvailabilityState = "Normal" | "Limited" | "DisasterRecoveryMode"; +// @public +export interface SiteCertificates { + createOrUpdate(resourceGroupName: string, name: string, certificateName: string, certificateEnvelope: Certificate, options?: SiteCertificatesCreateOrUpdateOptionalParams): Promise; + createOrUpdateSlot(resourceGroupName: string, name: string, slot: string, certificateName: string, certificateEnvelope: Certificate, options?: SiteCertificatesCreateOrUpdateSlotOptionalParams): Promise; + delete(resourceGroupName: string, name: string, certificateName: string, options?: SiteCertificatesDeleteOptionalParams): Promise; + deleteSlot(resourceGroupName: string, name: string, slot: string, certificateName: string, options?: SiteCertificatesDeleteSlotOptionalParams): Promise; + get(resourceGroupName: string, name: string, certificateName: string, options?: SiteCertificatesGetOptionalParams): Promise; + getSlot(resourceGroupName: string, name: string, slot: string, certificateName: string, options?: SiteCertificatesGetSlotOptionalParams): Promise; + list(resourceGroupName: string, name: string, options?: SiteCertificatesListOptionalParams): PagedAsyncIterableIterator; + listSlot(resourceGroupName: string, name: string, slot: string, options?: SiteCertificatesListSlotOptionalParams): PagedAsyncIterableIterator; + update(resourceGroupName: string, name: string, certificateName: string, certificateEnvelope: CertificatePatchResource, options?: SiteCertificatesUpdateOptionalParams): Promise; + updateSlot(resourceGroupName: string, name: string, slot: string, certificateName: string, certificateEnvelope: CertificatePatchResource, options?: SiteCertificatesUpdateSlotOptionalParams): Promise; +} + +// @public +export interface SiteCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesCreateOrUpdateResponse = Certificate; + +// @public +export interface SiteCertificatesCreateOrUpdateSlotOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesCreateOrUpdateSlotResponse = Certificate; + +// @public +export interface SiteCertificatesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SiteCertificatesDeleteSlotOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SiteCertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesGetResponse = Certificate; + +// @public +export interface SiteCertificatesGetSlotOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesGetSlotResponse = Certificate; + +// @public +export interface SiteCertificatesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesListNextResponse = CertificateCollection; + +// @public +export interface SiteCertificatesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesListResponse = CertificateCollection; + +// @public +export interface SiteCertificatesListSlotNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesListSlotNextResponse = CertificateCollection; + +// @public +export interface SiteCertificatesListSlotOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesListSlotResponse = CertificateCollection; + +// @public +export interface SiteCertificatesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesUpdateResponse = Certificate; + +// @public +export interface SiteCertificatesUpdateSlotOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SiteCertificatesUpdateSlotResponse = Certificate; + // @public export interface SiteCloneability { blockingCharacteristics?: SiteCloneabilityCriterion[]; @@ -6569,7 +6676,7 @@ export interface SiteLimits { } // @public -export type SiteLoadBalancing = "WeightedRoundRobin" | "LeastRequests" | "LeastResponseTime" | "WeightedTotalTraffic" | "RequestHash" | "PerSiteRoundRobin"; +export type SiteLoadBalancing = "WeightedRoundRobin" | "LeastRequests" | "LeastResponseTime" | "WeightedTotalTraffic" | "RequestHash" | "PerSiteRoundRobin" | "LeastRequestsWithTieBreaker"; // @public export interface SiteLogsConfig extends ProxyOnlyResource { @@ -8769,6 +8876,7 @@ export interface WebApps { updateFtpAllowedSlot(resourceGroupName: string, name: string, slot: string, csmPublishingAccessPoliciesEntity: CsmPublishingCredentialsPoliciesEntity, options?: WebAppsUpdateFtpAllowedSlotOptionalParams): Promise; updateHybridConnection(resourceGroupName: string, name: string, namespaceName: string, relayName: string, connectionEnvelope: HybridConnection, options?: WebAppsUpdateHybridConnectionOptionalParams): Promise; updateHybridConnectionSlot(resourceGroupName: string, name: string, namespaceName: string, relayName: string, slot: string, connectionEnvelope: HybridConnection, options?: WebAppsUpdateHybridConnectionSlotOptionalParams): Promise; + updateMachineKey(resourceGroupName: string, name: string, options?: WebAppsUpdateMachineKeyOptionalParams): Promise; updateMetadata(resourceGroupName: string, name: string, metadata: StringDictionary, options?: WebAppsUpdateMetadataOptionalParams): Promise; updateMetadataSlot(resourceGroupName: string, name: string, slot: string, metadata: StringDictionary, options?: WebAppsUpdateMetadataSlotOptionalParams): Promise; updatePremierAddOn(resourceGroupName: string, name: string, premierAddOnName: string, premierAddOn: PremierAddOnPatchResource, options?: WebAppsUpdatePremierAddOnOptionalParams): Promise; @@ -11932,6 +12040,13 @@ export interface WebAppsUpdateHybridConnectionSlotOptionalParams extends coreCli // @public export type WebAppsUpdateHybridConnectionSlotResponse = HybridConnection; +// @public +export interface WebAppsUpdateMachineKeyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type WebAppsUpdateMachineKeyResponse = Record; + // @public export interface WebAppsUpdateMetadataOptionalParams extends coreClient.OperationOptions { } @@ -12109,6 +12224,7 @@ export interface WebSiteInstanceStatus extends ProxyOnlyResource { }; detectorUrl?: string; healthCheckUrl?: string; + physicalZone?: string; // (undocumented) state?: SiteRuntimeState; statusUrl?: string; @@ -12172,6 +12288,8 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { // (undocumented) resourceHealthMetadataOperations: ResourceHealthMetadataOperations; // (undocumented) + siteCertificates: SiteCertificates; + // (undocumented) staticSites: StaticSites; // (undocumented) subscriptionId?: string; diff --git a/sdk/appservice/arm-appservice/src/models/index.ts b/sdk/appservice/arm-appservice/src/models/index.ts index ed3c7fb3e8dd..5c557778421f 100644 --- a/sdk/appservice/arm-appservice/src/models/index.ts +++ b/sdk/appservice/arm-appservice/src/models/index.ts @@ -100,7 +100,7 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; - /** Kind of resource. */ + /** Kind of resource. If the resource is an app, you can refer to https://github.com/Azure/app-service-linux-docs/blob/master/Things_You_Should_Know/kind_property.md#app-service-resource-kind-reference for details supported values for kind. */ kind?: string; /** Resource Location. */ location: string; @@ -5085,6 +5085,12 @@ export interface WorkflowVersionListResult { nextLink?: string; } +/** Describes valid TLS cipher suites. */ +export interface CipherSuites { + /** List of TLS Cipher Suites that are supported by App Service. */ + suites?: string[]; +} + /** Github access token for Appservice CLI github integration. */ export interface AppserviceGithubToken { /** Github access token for Appservice CLI github integration */ @@ -5479,6 +5485,10 @@ export interface Site extends Resource { clientCertMode?: ClientCertMode; /** client certificate authentication comma-separated exclusion paths */ clientCertExclusionPaths?: string; + /** Specifies the IP mode of the app. */ + ipMode?: IPMode; + /** Whether to use end to end encryption between the FrontEnd and the Worker */ + endToEndEncryptionEnabled?: boolean; /** * true to disable the public hostnames of the app; otherwise, false. * If true, the app is only accessible via API management process. @@ -5551,6 +5561,8 @@ export interface Site extends Resource { storageAccountRequired?: boolean; /** Identity to use for Key Vault Reference authentication. */ keyVaultReferenceIdentity?: string; + /** Specifies the scope of uniqueness for the default hostname during resource creation */ + autoGeneratedDomainNameLabelScope?: AutoGeneratedDomainNameLabelScope; /** * Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. * This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} @@ -5558,6 +5570,11 @@ export interface Site extends Resource { virtualNetworkSubnetId?: string; /** Azure Resource Manager ID of the customer's selected Managed Environment on which to host this app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName} */ managedEnvironmentId?: string; + /** + * Current SKU of application based on associated App Service Plan. Some valid SKU values are Free, Shared, Basic, Dynamic, FlexConsumption, Standard, Premium, PremiumV2, PremiumV3, Isolated, IsolatedV2 + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sku?: string; } /** App Service plan. */ @@ -8501,6 +8518,8 @@ export interface WebSiteInstanceStatus extends ProxyOnlyResource { healthCheckUrl?: string; /** Dictionary of */ containers?: { [propertyName: string]: ContainerInfo }; + /** The physical zone that the instance is in */ + physicalZone?: string; } /** Process Thread Information. */ @@ -11010,7 +11029,8 @@ export type SiteLoadBalancing = | "LeastResponseTime" | "WeightedTotalTraffic" | "RequestHash" - | "PerSiteRoundRobin"; + | "PerSiteRoundRobin" + | "LeastRequestsWithTieBreaker"; /** Defines values for AutoHealActionType. */ export type AutoHealActionType = "Recycle" | "LogEvent" | "CustomAction"; /** Defines values for AzureStorageType. */ @@ -11026,6 +11046,8 @@ export type ClientCertMode = | "Required" | "Optional" | "OptionalInteractiveUser"; +/** Defines values for IPMode. */ +export type IPMode = "IPv4" | "IPv6" | "IPv4AndIPv6"; /** Defines values for RedundancyMode. */ export type RedundancyMode = | "None" @@ -11033,6 +11055,12 @@ export type RedundancyMode = | "Failover" | "ActiveActive" | "GeoRedundant"; +/** Defines values for AutoGeneratedDomainNameLabelScope. */ +export type AutoGeneratedDomainNameLabelScope = + | "TenantReuse" + | "SubscriptionReuse" + | "ResourceGroupReuse" + | "NoReuse"; /** Defines values for ManagedServiceIdentityType. */ export type ManagedServiceIdentityType = | "SystemAssigned" @@ -11435,6 +11463,22 @@ export interface CertificateRegistrationProviderListOperationsNextOptionalParams export type CertificateRegistrationProviderListOperationsNextResponse = CsmOperationCollection; +/** Optional parameters. */ +export interface DomainRegistrationProviderListOperationsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOperations operation. */ +export type DomainRegistrationProviderListOperationsResponse = + CsmOperationCollection; + +/** Optional parameters. */ +export interface DomainRegistrationProviderListOperationsNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOperationsNext operation. */ +export type DomainRegistrationProviderListOperationsNextResponse = + CsmOperationCollection; + /** Optional parameters. */ export interface DomainsCheckAvailabilityOptionalParams extends coreClient.OperationOptions {} @@ -11614,22 +11658,6 @@ export interface TopLevelDomainsListAgreementsNextOptionalParams export type TopLevelDomainsListAgreementsNextResponse = TldLegalAgreementCollection; -/** Optional parameters. */ -export interface DomainRegistrationProviderListOperationsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listOperations operation. */ -export type DomainRegistrationProviderListOperationsResponse = - CsmOperationCollection; - -/** Optional parameters. */ -export interface DomainRegistrationProviderListOperationsNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listOperationsNext operation. */ -export type DomainRegistrationProviderListOperationsNextResponse = - CsmOperationCollection; - /** Optional parameters. */ export interface AppServiceEnvironmentsListOptionalParams extends coreClient.OperationOptions {} @@ -13586,6 +13614,84 @@ export interface GetUsagesInLocationListNextOptionalParams /** Contains response data for the listNext operation. */ export type GetUsagesInLocationListNextResponse = CsmUsageQuotaCollection; +/** Optional parameters. */ +export interface SiteCertificatesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type SiteCertificatesListResponse = CertificateCollection; + +/** Optional parameters. */ +export interface SiteCertificatesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type SiteCertificatesGetResponse = Certificate; + +/** Optional parameters. */ +export interface SiteCertificatesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type SiteCertificatesCreateOrUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface SiteCertificatesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SiteCertificatesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type SiteCertificatesUpdateResponse = Certificate; + +/** Optional parameters. */ +export interface SiteCertificatesListSlotOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSlot operation. */ +export type SiteCertificatesListSlotResponse = CertificateCollection; + +/** Optional parameters. */ +export interface SiteCertificatesGetSlotOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getSlot operation. */ +export type SiteCertificatesGetSlotResponse = Certificate; + +/** Optional parameters. */ +export interface SiteCertificatesCreateOrUpdateSlotOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdateSlot operation. */ +export type SiteCertificatesCreateOrUpdateSlotResponse = Certificate; + +/** Optional parameters. */ +export interface SiteCertificatesDeleteSlotOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface SiteCertificatesUpdateSlotOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateSlot operation. */ +export type SiteCertificatesUpdateSlotResponse = Certificate; + +/** Optional parameters. */ +export interface SiteCertificatesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type SiteCertificatesListNextResponse = CertificateCollection; + +/** Optional parameters. */ +export interface SiteCertificatesListSlotNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSlotNext operation. */ +export type SiteCertificatesListSlotNextResponse = CertificateCollection; + /** Optional parameters. */ export interface StaticSitesPreviewWorkflowOptionalParams extends coreClient.OperationOptions {} @@ -15236,6 +15342,13 @@ export interface WebAppsListSyncFunctionTriggersOptionalParams /** Contains response data for the listSyncFunctionTriggers operation. */ export type WebAppsListSyncFunctionTriggersResponse = FunctionSecrets; +/** Optional parameters. */ +export interface WebAppsUpdateMachineKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateMachineKey operation. */ +export type WebAppsUpdateMachineKeyResponse = Record; + /** Optional parameters. */ export interface WebAppsMigrateStorageOptionalParams extends coreClient.OperationOptions { diff --git a/sdk/appservice/arm-appservice/src/models/mappers.ts b/sdk/appservice/arm-appservice/src/models/mappers.ts index de2fa23e8993..fd0a77ec5f0b 100644 --- a/sdk/appservice/arm-appservice/src/models/mappers.ts +++ b/sdk/appservice/arm-appservice/src/models/mappers.ts @@ -2964,6 +2964,7 @@ export const SiteConfig: coreClient.CompositeMapper = { "WeightedTotalTraffic", "RequestHash", "PerSiteRoundRobin", + "LeastRequestsWithTieBreaker", ], }, }, @@ -15353,6 +15354,29 @@ export const WorkflowVersionListResult: coreClient.CompositeMapper = { }, }; +export const CipherSuites: coreClient.CompositeMapper = { + serializedName: "CipherSuites", + type: { + name: "Composite", + className: "CipherSuites", + modelProperties: { + suites: { + serializedName: "suites", + xmlName: "suites", + xmlElementName: "CipherSuitesItem", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + }, + }, +}; + export const AppserviceGithubToken: coreClient.CompositeMapper = { serializedName: "AppserviceGithubToken", type: { @@ -16472,6 +16496,21 @@ export const Site: coreClient.CompositeMapper = { name: "String", }, }, + ipMode: { + serializedName: "properties.ipMode", + xmlName: "properties.ipMode", + type: { + name: "Enum", + allowedValues: ["IPv4", "IPv6", "IPv4AndIPv6"], + }, + }, + endToEndEncryptionEnabled: { + serializedName: "properties.endToEndEncryptionEnabled", + xmlName: "properties.endToEndEncryptionEnabled", + type: { + name: "Boolean", + }, + }, hostNamesDisabled: { serializedName: "properties.hostNamesDisabled", xmlName: "properties.hostNamesDisabled", @@ -16622,6 +16661,19 @@ export const Site: coreClient.CompositeMapper = { name: "String", }, }, + autoGeneratedDomainNameLabelScope: { + serializedName: "properties.autoGeneratedDomainNameLabelScope", + xmlName: "properties.autoGeneratedDomainNameLabelScope", + type: { + name: "Enum", + allowedValues: [ + "TenantReuse", + "SubscriptionReuse", + "ResourceGroupReuse", + "NoReuse", + ], + }, + }, virtualNetworkSubnetId: { serializedName: "properties.virtualNetworkSubnetId", xmlName: "properties.virtualNetworkSubnetId", @@ -16636,6 +16688,14 @@ export const Site: coreClient.CompositeMapper = { name: "String", }, }, + sku: { + serializedName: "properties.sku", + readOnly: true, + xmlName: "properties.sku", + type: { + name: "String", + }, + }, }, }, }; @@ -23022,6 +23082,7 @@ export const SiteConfigResource: coreClient.CompositeMapper = { "WeightedTotalTraffic", "RequestHash", "PerSiteRoundRobin", + "LeastRequestsWithTieBreaker", ], }, }, @@ -24632,6 +24693,13 @@ export const WebSiteInstanceStatus: coreClient.CompositeMapper = { value: { type: { name: "Composite", className: "ContainerInfo" } }, }, }, + physicalZone: { + serializedName: "properties.physicalZone", + xmlName: "properties.physicalZone", + type: { + name: "String", + }, + }, }, }, }; diff --git a/sdk/appservice/arm-appservice/src/models/parameters.ts b/sdk/appservice/arm-appservice/src/models/parameters.ts index c29d757b3d5f..58088f5713fe 100644 --- a/sdk/appservice/arm-appservice/src/models/parameters.ts +++ b/sdk/appservice/arm-appservice/src/models/parameters.ts @@ -141,7 +141,7 @@ export const subscriptionId: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-12-01", + defaultValue: "2024-04-01", isConstant: true, serializedName: "api-version", type: { @@ -995,6 +995,48 @@ export const location1: OperationURLParameter = { }, }; +export const name2: OperationURLParameter = { + parameterPath: "name", + mapper: { + constraints: { + Pattern: new RegExp("^[A-z][A-z0-9]*$"), + }, + serializedName: "name", + required: true, + xmlName: "name", + type: { + name: "String", + }, + }, +}; + +export const certificateName: OperationURLParameter = { + parameterPath: "certificateName", + mapper: { + constraints: { + Pattern: new RegExp("^[A-z][A-z0-9]*$"), + }, + serializedName: "certificateName", + required: true, + xmlName: "certificateName", + type: { + name: "String", + }, + }, +}; + +export const certificateName1: OperationURLParameter = { + parameterPath: "certificateName", + mapper: { + serializedName: "certificateName", + required: true, + xmlName: "certificateName", + type: { + name: "String", + }, + }, +}; + export const staticSitesWorkflowPreviewRequest: OperationParameter = { parameterPath: "staticSitesWorkflowPreviewRequest", mapper: StaticSitesWorkflowPreviewRequestMapper, diff --git a/sdk/appservice/arm-appservice/src/operations/index.ts b/sdk/appservice/arm-appservice/src/operations/index.ts index 87d60f834b34..573848605ea9 100644 --- a/sdk/appservice/arm-appservice/src/operations/index.ts +++ b/sdk/appservice/arm-appservice/src/operations/index.ts @@ -9,9 +9,9 @@ export * from "./appServiceCertificateOrders"; export * from "./certificateOrdersDiagnostics"; export * from "./certificateRegistrationProvider"; +export * from "./domainRegistrationProvider"; export * from "./domains"; export * from "./topLevelDomains"; -export * from "./domainRegistrationProvider"; export * from "./appServiceEnvironments"; export * from "./appServicePlans"; export * from "./certificates"; @@ -25,6 +25,7 @@ export * from "./provider"; export * from "./recommendations"; export * from "./resourceHealthMetadataOperations"; export * from "./getUsagesInLocation"; +export * from "./siteCertificates"; export * from "./staticSites"; export * from "./webApps"; export * from "./workflows"; diff --git a/sdk/appservice/arm-appservice/src/operations/siteCertificates.ts b/sdk/appservice/arm-appservice/src/operations/siteCertificates.ts new file mode 100644 index 000000000000..1d121611f8c5 --- /dev/null +++ b/sdk/appservice/arm-appservice/src/operations/siteCertificates.ts @@ -0,0 +1,767 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SiteCertificates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { WebSiteManagementClient } from "../webSiteManagementClient"; +import { + Certificate, + SiteCertificatesListNextOptionalParams, + SiteCertificatesListOptionalParams, + SiteCertificatesListResponse, + SiteCertificatesListSlotNextOptionalParams, + SiteCertificatesListSlotOptionalParams, + SiteCertificatesListSlotResponse, + SiteCertificatesGetOptionalParams, + SiteCertificatesGetResponse, + SiteCertificatesCreateOrUpdateOptionalParams, + SiteCertificatesCreateOrUpdateResponse, + SiteCertificatesDeleteOptionalParams, + CertificatePatchResource, + SiteCertificatesUpdateOptionalParams, + SiteCertificatesUpdateResponse, + SiteCertificatesGetSlotOptionalParams, + SiteCertificatesGetSlotResponse, + SiteCertificatesCreateOrUpdateSlotOptionalParams, + SiteCertificatesCreateOrUpdateSlotResponse, + SiteCertificatesDeleteSlotOptionalParams, + SiteCertificatesUpdateSlotOptionalParams, + SiteCertificatesUpdateSlotResponse, + SiteCertificatesListNextResponse, + SiteCertificatesListSlotNextResponse, +} from "../models"; + +/// +/** Class containing SiteCertificates operations. */ +export class SiteCertificatesImpl implements SiteCertificates { + private readonly client: WebSiteManagementClient; + + /** + * Initialize a new instance of the class SiteCertificates class. + * @param client Reference to the service client + */ + constructor(client: WebSiteManagementClient) { + this.client = client; + } + + /** + * Get all certificates in a resource group under a site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + name: string, + options?: SiteCertificatesListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, name, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(resourceGroupName, name, options, settings); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + name: string, + options?: SiteCertificatesListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: SiteCertificatesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, name, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + name, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + name: string, + options?: SiteCertificatesListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + name, + options, + )) { + yield* page; + } + } + + /** + * Get all certificates in a resource group for a given site and a deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param options The options parameters. + */ + public listSlot( + resourceGroupName: string, + name: string, + slot: string, + options?: SiteCertificatesListSlotOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSlotPagingAll(resourceGroupName, name, slot, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listSlotPagingPage( + resourceGroupName, + name, + slot, + options, + settings, + ); + }, + }; + } + + private async *listSlotPagingPage( + resourceGroupName: string, + name: string, + slot: string, + options?: SiteCertificatesListSlotOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: SiteCertificatesListSlotResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listSlot(resourceGroupName, name, slot, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listSlotNext( + resourceGroupName, + name, + slot, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listSlotPagingAll( + resourceGroupName: string, + name: string, + slot: string, + options?: SiteCertificatesListSlotOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSlotPagingPage( + resourceGroupName, + name, + slot, + options, + )) { + yield* page; + } + } + + /** + * Get all certificates in a resource group under a site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + name: string, + options?: SiteCertificatesListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + listOperationSpec, + ); + } + + /** + * Get a certificate belonging to a given site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + certificateName: string, + options?: SiteCertificatesGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, certificateName, options }, + getOperationSpec, + ); + } + + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + name: string, + certificateName: string, + certificateEnvelope: Certificate, + options?: SiteCertificatesCreateOrUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + certificateName, + certificateEnvelope, + options, + }, + createOrUpdateOperationSpec, + ); + } + + /** + * Delete a certificate from the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + name: string, + certificateName: string, + options?: SiteCertificatesDeleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, certificateName, options }, + deleteOperationSpec, + ); + } + + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + name: string, + certificateName: string, + certificateEnvelope: CertificatePatchResource, + options?: SiteCertificatesUpdateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + certificateName, + certificateEnvelope, + options, + }, + updateOperationSpec, + ); + } + + /** + * Get all certificates in a resource group for a given site and a deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param options The options parameters. + */ + private _listSlot( + resourceGroupName: string, + name: string, + slot: string, + options?: SiteCertificatesListSlotOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, slot, options }, + listSlotOperationSpec, + ); + } + + /** + * Get a certificate for a given site and deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + getSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + options?: SiteCertificatesGetSlotOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, slot, certificateName, options }, + getSlotOperationSpec, + ); + } + + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + createOrUpdateSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + certificateEnvelope: Certificate, + options?: SiteCertificatesCreateOrUpdateSlotOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + slot, + certificateName, + certificateEnvelope, + options, + }, + createOrUpdateSlotOperationSpec, + ); + } + + /** + * Delete a certificate for a given site and deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + deleteSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + options?: SiteCertificatesDeleteSlotOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, slot, certificateName, options }, + deleteSlotOperationSpec, + ); + } + + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + updateSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + certificateEnvelope: CertificatePatchResource, + options?: SiteCertificatesUpdateSlotOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + name, + slot, + certificateName, + certificateEnvelope, + options, + }, + updateSlotOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + name: string, + nextLink: string, + options?: SiteCertificatesListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListSlotNext + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param nextLink The nextLink from the previous successful call to the ListSlot method. + * @param options The options parameters. + */ + private _listSlotNext( + resourceGroupName: string, + name: string, + slot: string, + nextLink: string, + options?: SiteCertificatesListSlotNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, slot, nextLink, options }, + listSlotNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name2, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/certificates/{certificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Certificate, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name2, + Parameters.certificateName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/certificates/{certificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Certificate, + }, + 201: { + bodyMapper: Mappers.Certificate, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.certificateEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name2, + Parameters.certificateName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/certificates/{certificateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.certificateName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/certificates/{certificateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Certificate, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.certificateEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.certificateName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listSlotOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/certificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.slot, + Parameters.name2, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSlotOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/certificates/{certificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.Certificate, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.slot, + Parameters.name2, + Parameters.certificateName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateSlotOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/certificates/{certificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.Certificate, + }, + 201: { + bodyMapper: Mappers.Certificate, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.certificateEnvelope, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.slot, + Parameters.certificateName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteSlotOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/certificates/{certificateName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.slot, + Parameters.certificateName1, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateSlotOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/certificates/{certificateName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.Certificate, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + requestBody: Parameters.certificateEnvelope1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + Parameters.slot, + Parameters.certificateName1, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.name2, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listSlotNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CertificateCollection, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.slot, + Parameters.name2, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/appservice/arm-appservice/src/operations/webApps.ts b/sdk/appservice/arm-appservice/src/operations/webApps.ts index dd716d143822..d8939fb22aa5 100644 --- a/sdk/appservice/arm-appservice/src/operations/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operations/webApps.ts @@ -455,6 +455,8 @@ import { WebAppsIsCloneableResponse, WebAppsListSyncFunctionTriggersOptionalParams, WebAppsListSyncFunctionTriggersResponse, + WebAppsUpdateMachineKeyOptionalParams, + WebAppsUpdateMachineKeyResponse, StorageMigrationOptions, WebAppsMigrateStorageOptionalParams, WebAppsMigrateStorageResponse, @@ -9983,6 +9985,23 @@ export class WebAppsImpl implements WebApps { ); } + /** + * Updates the machine key of an app. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The options parameters. + */ + updateMachineKey( + resourceGroupName: string, + name: string, + options?: WebAppsUpdateMachineKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, name, options }, + updateMachineKeyOperationSpec, + ); + } + /** * Description for Restores a web app. * @param subscriptionName Azure subscription. @@ -22677,6 +22696,29 @@ const listSyncFunctionTriggersOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const updateMachineKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/updatemachinekey", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: { + type: { name: "Dictionary", value: { type: { name: "any" } } }, + }, + }, + default: { + bodyMapper: Mappers.DefaultErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.name, + ], + headerParameters: [Parameters.accept], + serializer, +}; const migrateStorageOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate", httpMethod: "PUT", diff --git a/sdk/appservice/arm-appservice/src/operationsInterfaces/index.ts b/sdk/appservice/arm-appservice/src/operationsInterfaces/index.ts index 87d60f834b34..573848605ea9 100644 --- a/sdk/appservice/arm-appservice/src/operationsInterfaces/index.ts +++ b/sdk/appservice/arm-appservice/src/operationsInterfaces/index.ts @@ -9,9 +9,9 @@ export * from "./appServiceCertificateOrders"; export * from "./certificateOrdersDiagnostics"; export * from "./certificateRegistrationProvider"; +export * from "./domainRegistrationProvider"; export * from "./domains"; export * from "./topLevelDomains"; -export * from "./domainRegistrationProvider"; export * from "./appServiceEnvironments"; export * from "./appServicePlans"; export * from "./certificates"; @@ -25,6 +25,7 @@ export * from "./provider"; export * from "./recommendations"; export * from "./resourceHealthMetadataOperations"; export * from "./getUsagesInLocation"; +export * from "./siteCertificates"; export * from "./staticSites"; export * from "./webApps"; export * from "./workflows"; diff --git a/sdk/appservice/arm-appservice/src/operationsInterfaces/siteCertificates.ts b/sdk/appservice/arm-appservice/src/operationsInterfaces/siteCertificates.ts new file mode 100644 index 000000000000..4be54d53a65f --- /dev/null +++ b/sdk/appservice/arm-appservice/src/operationsInterfaces/siteCertificates.ts @@ -0,0 +1,183 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + Certificate, + SiteCertificatesListOptionalParams, + SiteCertificatesListSlotOptionalParams, + SiteCertificatesGetOptionalParams, + SiteCertificatesGetResponse, + SiteCertificatesCreateOrUpdateOptionalParams, + SiteCertificatesCreateOrUpdateResponse, + SiteCertificatesDeleteOptionalParams, + CertificatePatchResource, + SiteCertificatesUpdateOptionalParams, + SiteCertificatesUpdateResponse, + SiteCertificatesGetSlotOptionalParams, + SiteCertificatesGetSlotResponse, + SiteCertificatesCreateOrUpdateSlotOptionalParams, + SiteCertificatesCreateOrUpdateSlotResponse, + SiteCertificatesDeleteSlotOptionalParams, + SiteCertificatesUpdateSlotOptionalParams, + SiteCertificatesUpdateSlotResponse, +} from "../models"; + +/// +/** Interface representing a SiteCertificates. */ +export interface SiteCertificates { + /** + * Get all certificates in a resource group under a site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + name: string, + options?: SiteCertificatesListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get all certificates in a resource group for a given site and a deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param options The options parameters. + */ + listSlot( + resourceGroupName: string, + name: string, + slot: string, + options?: SiteCertificatesListSlotOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Get a certificate belonging to a given site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + name: string, + certificateName: string, + options?: SiteCertificatesGetOptionalParams, + ): Promise; + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + name: string, + certificateName: string, + certificateEnvelope: Certificate, + options?: SiteCertificatesCreateOrUpdateOptionalParams, + ): Promise; + /** + * Delete a certificate from the site. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + name: string, + certificateName: string, + options?: SiteCertificatesDeleteOptionalParams, + ): Promise; + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + name: string, + certificateName: string, + certificateEnvelope: CertificatePatchResource, + options?: SiteCertificatesUpdateOptionalParams, + ): Promise; + /** + * Get a certificate for a given site and deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + getSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + options?: SiteCertificatesGetSlotOptionalParams, + ): Promise; + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + createOrUpdateSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + certificateEnvelope: Certificate, + options?: SiteCertificatesCreateOrUpdateSlotOptionalParams, + ): Promise; + /** + * Delete a certificate for a given site and deployment slot. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param options The options parameters. + */ + deleteSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + options?: SiteCertificatesDeleteSlotOptionalParams, + ): Promise; + /** + * Description for Create or update a certificate. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding + * for the production slot. + * @param certificateName Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param options The options parameters. + */ + updateSlot( + resourceGroupName: string, + name: string, + slot: string, + certificateName: string, + certificateEnvelope: CertificatePatchResource, + options?: SiteCertificatesUpdateSlotOptionalParams, + ): Promise; +} diff --git a/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts b/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts index b9e29e31b4e7..01af87193db6 100644 --- a/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts +++ b/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts @@ -306,6 +306,8 @@ import { WebAppsIsCloneableResponse, WebAppsListSyncFunctionTriggersOptionalParams, WebAppsListSyncFunctionTriggersResponse, + WebAppsUpdateMachineKeyOptionalParams, + WebAppsUpdateMachineKeyResponse, StorageMigrationOptions, WebAppsMigrateStorageOptionalParams, WebAppsMigrateStorageResponse, @@ -3108,6 +3110,17 @@ export interface WebApps { name: string, options?: WebAppsListSyncFunctionTriggersOptionalParams, ): Promise; + /** + * Updates the machine key of an app. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param options The options parameters. + */ + updateMachineKey( + resourceGroupName: string, + name: string, + options?: WebAppsUpdateMachineKeyOptionalParams, + ): Promise; /** * Description for Restores a web app. * @param subscriptionName Azure subscription. diff --git a/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts b/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts index 27963e761b6e..2cb0119f07bd 100644 --- a/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts +++ b/sdk/appservice/arm-appservice/src/webSiteManagementClient.ts @@ -20,9 +20,9 @@ import { AppServiceCertificateOrdersImpl, CertificateOrdersDiagnosticsImpl, CertificateRegistrationProviderImpl, + DomainRegistrationProviderImpl, DomainsImpl, TopLevelDomainsImpl, - DomainRegistrationProviderImpl, AppServiceEnvironmentsImpl, AppServicePlansImpl, CertificatesImpl, @@ -36,6 +36,7 @@ import { RecommendationsImpl, ResourceHealthMetadataOperationsImpl, GetUsagesInLocationImpl, + SiteCertificatesImpl, StaticSitesImpl, WebAppsImpl, WorkflowsImpl, @@ -52,9 +53,9 @@ import { AppServiceCertificateOrders, CertificateOrdersDiagnostics, CertificateRegistrationProvider, + DomainRegistrationProvider, Domains, TopLevelDomains, - DomainRegistrationProvider, AppServiceEnvironments, AppServicePlans, Certificates, @@ -68,6 +69,7 @@ import { Recommendations, ResourceHealthMetadataOperations, GetUsagesInLocation, + SiteCertificates, StaticSites, WebApps, Workflows, @@ -195,7 +197,7 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-appservice/15.0.1`; + const packageDetails = `azsdk-js-arm-appservice/15.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -249,7 +251,7 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-12-01"; + this.apiVersion = options.apiVersion || "2024-04-01"; this.appServiceCertificateOrders = new AppServiceCertificateOrdersImpl( this, ); @@ -258,9 +260,9 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { ); this.certificateRegistrationProvider = new CertificateRegistrationProviderImpl(this); + this.domainRegistrationProvider = new DomainRegistrationProviderImpl(this); this.domains = new DomainsImpl(this); this.topLevelDomains = new TopLevelDomainsImpl(this); - this.domainRegistrationProvider = new DomainRegistrationProviderImpl(this); this.appServiceEnvironments = new AppServiceEnvironmentsImpl(this); this.appServicePlans = new AppServicePlansImpl(this); this.certificates = new CertificatesImpl(this); @@ -275,6 +277,7 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { this.resourceHealthMetadataOperations = new ResourceHealthMetadataOperationsImpl(this); this.getUsagesInLocation = new GetUsagesInLocationImpl(this); + this.siteCertificates = new SiteCertificatesImpl(this); this.staticSites = new StaticSitesImpl(this); this.webApps = new WebAppsImpl(this); this.workflows = new WorkflowsImpl(this); @@ -1090,9 +1093,9 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { appServiceCertificateOrders: AppServiceCertificateOrders; certificateOrdersDiagnostics: CertificateOrdersDiagnostics; certificateRegistrationProvider: CertificateRegistrationProvider; + domainRegistrationProvider: DomainRegistrationProvider; domains: Domains; topLevelDomains: TopLevelDomains; - domainRegistrationProvider: DomainRegistrationProvider; appServiceEnvironments: AppServiceEnvironments; appServicePlans: AppServicePlans; certificates: Certificates; @@ -1106,6 +1109,7 @@ export class WebSiteManagementClient extends coreClient.ServiceClient { recommendations: Recommendations; resourceHealthMetadataOperations: ResourceHealthMetadataOperations; getUsagesInLocation: GetUsagesInLocation; + siteCertificates: SiteCertificates; staticSites: StaticSites; webApps: WebApps; workflows: Workflows; diff --git a/sdk/appservice/arm-appservice/test/sampleTest.ts b/sdk/appservice/arm-appservice/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/appservice/arm-appservice/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env, +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables, +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/appservice/arm-appservice/tsconfig.json b/sdk/appservice/arm-appservice/tsconfig.json index c0481691633c..3e6ae96443f3 100644 --- a/sdk/appservice/arm-appservice/tsconfig.json +++ b/sdk/appservice/arm-appservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-appservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"