diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 210c17097c58..0056582345d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23858,7 +23858,7 @@ importers: sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters: dependencies: '@azure-rest/core-client': - specifier: ^2.1.0 + specifier: ^2.3.1 version: link:../../core/core-client-rest '@azure/abort-controller': specifier: ^2.1.2 @@ -23867,62 +23867,62 @@ importers: specifier: ^1.9.0 version: link:../../core/core-auth '@azure/core-lro': - specifier: ^3.0.0 + specifier: ^3.1.0 version: link:../../core/core-lro '@azure/core-rest-pipeline': - specifier: ^1.18.2 + specifier: ^1.20.0 version: link:../../core/core-rest-pipeline '@azure/core-util': - specifier: ^1.11.0 + specifier: ^1.12.0 version: link:../../core/core-util '@azure/logger': - specifier: ^1.1.4 + specifier: ^1.2.0 version: link:../../core/logger tslib: specifier: ^2.8.1 version: 2.8.1 devDependencies: '@azure-tools/test-credential': - specifier: workspace:^ + specifier: ^2.0.0 version: link:../../test-utils/test-credential '@azure-tools/test-recorder': - specifier: workspace:^ + specifier: ^4.1.0 version: link:../../test-utils/recorder '@azure-tools/test-utils-vitest': - specifier: workspace:^ - version: link:../../test-utils/test-utils-vitest + specifier: ^1.0.0 + version: 1.0.0(@types/debug@4.1.12)(@types/node@20.19.17)(@vitest/browser@3.2.4)(jsdom@16.7.0)(msw@2.7.3(@types/node@20.19.17)(typescript@5.8.3))(terser@5.39.0)(tsx@4.20.6)(yaml@2.8.1) '@azure/dev-tool': - specifier: workspace:^ + specifier: ^1.0.0 version: link:../../../common/tools/dev-tool '@azure/eslint-plugin-azure-sdk': - specifier: workspace:^ + specifier: ^3.0.0 version: link:../../../common/tools/eslint-plugin-azure-sdk '@azure/identity': - specifier: catalog:internal - version: 4.11.1 + specifier: ^4.9.0 + version: link:../../identity/identity '@types/node': - specifier: 'catalog:' + specifier: ^20.0.0 version: 20.19.17 '@vitest/browser': - specifier: catalog:testing + specifier: ^3.0.9 version: 3.2.4(msw@2.7.3(@types/node@20.19.17)(typescript@5.8.3))(playwright@1.55.1)(vite@7.1.7(@types/node@20.19.17)(terser@5.39.0)(tsx@4.20.6)(yaml@2.8.1))(vitest@3.2.4) '@vitest/coverage-istanbul': - specifier: catalog:testing + specifier: ^3.0.9 version: 3.2.4(vitest@3.2.4) dotenv: - specifier: catalog:testing + specifier: ^16.0.0 version: 16.6.1 eslint: - specifier: 'catalog:' + specifier: ^9.9.0 version: 9.36.0 playwright: - specifier: catalog:testing + specifier: ^1.52.0 version: 1.55.1 typescript: specifier: ~5.8.2 version: 5.8.3 vitest: - specifier: catalog:testing + specifier: ^3.0.9 version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.17)(@vitest/browser@3.2.4)(jsdom@16.7.0)(msw@2.7.3(@types/node@20.19.17)(typescript@5.8.3))(terser@5.39.0)(tsx@4.20.6)(yaml@2.8.1) sdk/servicefabricmesh/arm-servicefabricmesh: diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md index bb476f910992..7b64dd965a32 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/CHANGELOG.md @@ -1,4 +1,288 @@ # Release History + +## 1.0.0-beta.5 (2025-10-02) +Compared with version 1.0.0-beta.3 + +### Features Added + - Added operation group ManagedAzResiliencyStatusOperations + - Added operation group ManagedMaintenanceWindowStatusOperations + - Added operation ApplicationsOperations.createOrUpdate + - Added operation ApplicationsOperations.delete + - Added operation ApplicationsOperations.readUpgrade + - Added operation ApplicationsOperations.resumeUpgrade + - Added operation ApplicationsOperations.startRollback + - Added operation ApplicationsOperations.updateUpgrade + - Added operation ApplicationTypesOperations.delete + - Added operation ApplicationTypeVersionsOperations.createOrUpdate + - Added operation ApplicationTypeVersionsOperations.delete + - Added operation ManagedClustersOperations.createOrUpdate + - Added operation ManagedClustersOperations.delete + - Added operation ManagedClustersOperations.getFaultSimulation + - Added operation ManagedClustersOperations.listFaultSimulation + - Added operation ManagedClustersOperations.startFaultSimulation + - Added operation ManagedClustersOperations.stopFaultSimulation + - Added operation NodeTypesOperations.createOrUpdate + - Added operation NodeTypesOperations.deallocate + - Added operation NodeTypesOperations.delete + - Added operation NodeTypesOperations.deleteNode + - Added operation NodeTypesOperations.getFaultSimulation + - Added operation NodeTypesOperations.listFaultSimulation + - Added operation NodeTypesOperations.redeploy + - Added operation NodeTypesOperations.reimage + - Added operation NodeTypesOperations.restart + - Added operation NodeTypesOperations.start + - Added operation NodeTypesOperations.startFaultSimulation + - Added operation NodeTypesOperations.stopFaultSimulation + - Added operation NodeTypesOperations.update + - Added operation ServicesOperations.createOrUpdate + - Added operation ServicesOperations.delete + - Added Interface ApplicationResourceProperties + - Added Interface ApplicationsUpdateUpgradeOptionalParams + - Added Interface ApplicationTypeResourceProperties + - Added Interface ApplicationTypeVersionResourceProperties + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface FaultSimulation + - Added Interface FaultSimulationConstraints + - Added Interface FaultSimulationContent + - Added Interface FaultSimulationContentWrapper + - Added Interface FaultSimulationDetails + - Added Interface FaultSimulationIdContent + - Added Interface IPConfigurationPublicIPAddressConfiguration + - Added Interface ManagedClusterProperties + - Added Interface ManagedClustersGetFaultSimulationOptionalParams + - Added Interface ManagedClustersListFaultSimulationOptionalParams + - Added Interface ManagedClustersStartFaultSimulationOptionalParams + - Added Interface ManagedClustersStopFaultSimulationOptionalParams + - Added Interface ManagedClusterVersionDetails + - Added Interface NodeTypeFaultSimulation + - Added Interface NodeTypeProperties + - Added Interface NodeTypesDeallocateOptionalParams + - Added Interface NodeTypesGetFaultSimulationOptionalParams + - Added Interface NodeTypesListFaultSimulationOptionalParams + - Added Interface NodeTypesRedeployOptionalParams + - Added Interface NodeTypesStartFaultSimulationOptionalParams + - Added Interface NodeTypesStartOptionalParams + - Added Interface NodeTypesStopFaultSimulationOptionalParams + - Added Interface PagedAsyncIterableIterator + - Added Interface PageSettings + - Added Interface RestorePollerOptions + - Added Interface RuntimeApplicationHealthPolicy + - Added Interface RuntimeRollingUpgradeUpdateMonitoringPolicy + - Added Interface RuntimeServiceTypeHealthPolicy + - Added Interface RuntimeUpdateApplicationUpgradeParameters + - Added Interface TrackedResource + - Added Interface VmssExtensionProperties + - Added Interface ZoneFaultSimulationContent + - Interface ApplicationResource has a new optional parameter properties + - Interface ApplicationTypeResource has a new optional parameter properties + - Interface ApplicationTypeVersionResource has a new optional parameter properties + - Interface ManagedCluster has a new optional parameter properties + - Interface NodeType has a new optional parameter properties + - Interface ServiceEndpoint has a new optional parameter networkIdentifier + - Added Type Alias AzureSupportedClouds + - Added Type Alias CreatedByType + - Added Type Alias FaultKind + - Added Type Alias FaultSimulationContentUnion + - Added Type Alias FaultSimulationStatus + - Added Type Alias RuntimeFailureAction + - Added Type Alias RuntimeRollingUpgradeMode + - Added Type Alias RuntimeUpgradeKind + - Added Type Alias SecurityEncryptionType + - Added Type Alias SfmcOperationStatus + - Added Enum AzureClouds + - Added Enum KnownCreatedByType + - Added Enum KnownFaultKind + - Added Enum KnownFaultSimulationStatus + - Added Enum KnownRuntimeFailureAction + - Added Enum KnownRuntimeRollingUpgradeMode + - Added Enum KnownRuntimeUpgradeKind + - Added Enum KnownSecurityEncryptionType + - Added Enum KnownSfmcOperationStatus + - Added Enum KnownVersions + - Enum KnownDiskType has a new value PremiumV2LRS + - Enum KnownDiskType has a new value PremiumZRS + - Enum KnownDiskType has a new value StandardSSDZRS + - Enum KnownSecurityType has a new value ConfidentialVM + +### Breaking Changes + - Removed operation Applications.beginCreateOrUpdate + - Removed operation Applications.beginCreateOrUpdateAndWait + - Removed operation Applications.beginDelete + - Removed operation Applications.beginDeleteAndWait + - Removed operation Applications.beginReadUpgrade + - Removed operation Applications.beginReadUpgradeAndWait + - Removed operation Applications.beginResumeUpgrade + - Removed operation Applications.beginResumeUpgradeAndWait + - Removed operation Applications.beginStartRollback + - Removed operation Applications.beginStartRollbackAndWait + - Removed operation ApplicationTypes.beginDelete + - Removed operation ApplicationTypes.beginDeleteAndWait + - Removed operation ApplicationTypeVersions.beginCreateOrUpdate + - Removed operation ApplicationTypeVersions.beginCreateOrUpdateAndWait + - Removed operation ApplicationTypeVersions.beginDelete + - Removed operation ApplicationTypeVersions.beginDeleteAndWait + - Removed operation ManagedClusters.beginCreateOrUpdate + - Removed operation ManagedClusters.beginCreateOrUpdateAndWait + - Removed operation ManagedClusters.beginDelete + - Removed operation ManagedClusters.beginDeleteAndWait + - Removed operation NodeTypes.beginCreateOrUpdate + - Removed operation NodeTypes.beginCreateOrUpdateAndWait + - Removed operation NodeTypes.beginDelete + - Removed operation NodeTypes.beginDeleteAndWait + - Removed operation NodeTypes.beginDeleteNode + - Removed operation NodeTypes.beginDeleteNodeAndWait + - Removed operation NodeTypes.beginReimage + - Removed operation NodeTypes.beginReimageAndWait + - Removed operation NodeTypes.beginRestart + - Removed operation NodeTypes.beginRestartAndWait + - Removed operation NodeTypes.beginUpdate + - Removed operation NodeTypes.beginUpdateAndWait + - Removed operation Services.beginCreateOrUpdate + - Removed operation Services.beginCreateOrUpdateAndWait + - Removed operation Services.beginDelete + - Removed operation Services.beginDeleteAndWait + - Operation OperationResults.get has a new signature + - Operation Services.get has a new signature + - Operation Services.update has a new signature + - Removed Interface ApplicationResourceList + - Removed Interface ApplicationTypeResourceList + - Removed Interface ApplicationTypeVersionResourceList + - Removed Interface ErrorModel + - Removed Interface IpConfigurationPublicIPAddressConfiguration + - Removed Interface ManagedAzResiliencyStatusOperationsOperations + - Removed Interface ManagedMaintenanceWindowStatusOperationsOperations + - Removed Interface ManagedProxyResource + - Removed Interface ServiceResourceList + - Interface VmssExtension has a new required parameter properties + - Type of parameter partitionScheme of interface Partition is changed from "Named" | "Singleton" | "UniformInt64Range" to PartitionScheme + - Type of parameter kind of interface ScalingMechanism is changed from "AddRemoveIncrementalNamedPartition" | "ScalePartitionInstanceCount" to ServiceScalingMechanismKind + - Type of parameter kind of interface ScalingTrigger is changed from "AveragePartitionLoadTrigger" | "AverageServiceLoadTrigger" to ServiceScalingTriggerKind + - Type of parameter type of interface ServicePlacementPolicy is changed from "InvalidDomain" | "NonPartiallyPlaceService" | "PreferredPrimaryDomain" | "RequiredDomain" | "RequiredDomainDistribution" to ServicePlacementPolicyType + - Interface ApplicationResource no longer has parameter managedIdentities + - Interface ApplicationResource no longer has parameter parameters + - Interface ApplicationResource no longer has parameter provisioningState + - Interface ApplicationResource no longer has parameter upgradePolicy + - Interface ApplicationResource no longer has parameter version + - Interface ApplicationTypeResource no longer has parameter provisioningState + - Interface ApplicationTypeVersionResource no longer has parameter appPackageUrl + - Interface ApplicationTypeVersionResource no longer has parameter provisioningState + - Interface ManagedCluster no longer has parameter addonFeatures + - Interface ManagedCluster no longer has parameter adminPassword + - Interface ManagedCluster no longer has parameter adminUserName + - Interface ManagedCluster no longer has parameter allocatedOutboundPorts + - Interface ManagedCluster no longer has parameter allowRdpAccess + - Interface ManagedCluster no longer has parameter applicationTypeVersionsCleanupPolicy + - Interface ManagedCluster no longer has parameter autoGeneratedDomainNameLabelScope + - Interface ManagedCluster no longer has parameter auxiliarySubnets + - Interface ManagedCluster no longer has parameter azureActiveDirectory + - Interface ManagedCluster no longer has parameter clientConnectionPort + - Interface ManagedCluster no longer has parameter clients + - Interface ManagedCluster no longer has parameter clusterCertificateThumbprints + - Interface ManagedCluster no longer has parameter clusterCodeVersion + - Interface ManagedCluster no longer has parameter clusterId + - Interface ManagedCluster no longer has parameter clusterState + - Interface ManagedCluster no longer has parameter clusterUpgradeCadence + - Interface ManagedCluster no longer has parameter clusterUpgradeMode + - Interface ManagedCluster no longer has parameter ddosProtectionPlanId + - Interface ManagedCluster no longer has parameter dnsName + - Interface ManagedCluster no longer has parameter enableAutoOSUpgrade + - Interface ManagedCluster no longer has parameter enableHttpGatewayExclusiveAuthMode + - Interface ManagedCluster no longer has parameter enableIpv6 + - Interface ManagedCluster no longer has parameter enableServicePublicIP + - Interface ManagedCluster no longer has parameter fabricSettings + - Interface ManagedCluster no longer has parameter fqdn + - Interface ManagedCluster no longer has parameter httpGatewayConnectionPort + - Interface ManagedCluster no longer has parameter httpGatewayTokenAuthConnectionPort + - Interface ManagedCluster no longer has parameter ipTags + - Interface ManagedCluster no longer has parameter ipv4Address + - Interface ManagedCluster no longer has parameter ipv6Address + - Interface ManagedCluster no longer has parameter loadBalancingRules + - Interface ManagedCluster no longer has parameter networkSecurityRules + - Interface ManagedCluster no longer has parameter provisioningState + - Interface ManagedCluster no longer has parameter publicIPPrefixId + - Interface ManagedCluster no longer has parameter publicIPv6PrefixId + - Interface ManagedCluster no longer has parameter serviceEndpoints + - Interface ManagedCluster no longer has parameter subnetId + - Interface ManagedCluster no longer has parameter upgradeDescription + - Interface ManagedCluster no longer has parameter useCustomVnet + - Interface ManagedCluster no longer has parameter zonalResiliency + - Interface ManagedCluster no longer has parameter zonalUpdateMode + - Interface NodeType no longer has parameter additionalDataDisks + - Interface NodeType no longer has parameter additionalNetworkInterfaceConfigurations + - Interface NodeType no longer has parameter applicationPorts + - Interface NodeType no longer has parameter capacities + - Interface NodeType no longer has parameter computerNamePrefix + - Interface NodeType no longer has parameter dataDiskLetter + - Interface NodeType no longer has parameter dataDiskSizeGB + - Interface NodeType no longer has parameter dataDiskType + - Interface NodeType no longer has parameter dscpConfigurationId + - Interface NodeType no longer has parameter enableAcceleratedNetworking + - Interface NodeType no longer has parameter enableEncryptionAtHost + - Interface NodeType no longer has parameter enableNodePublicIP + - Interface NodeType no longer has parameter enableNodePublicIPv6 + - Interface NodeType no longer has parameter enableOverProvisioning + - Interface NodeType no longer has parameter ephemeralPorts + - Interface NodeType no longer has parameter evictionPolicy + - Interface NodeType no longer has parameter frontendConfigurations + - Interface NodeType no longer has parameter hostGroupId + - Interface NodeType no longer has parameter isPrimary + - Interface NodeType no longer has parameter isSpotVM + - Interface NodeType no longer has parameter isStateless + - Interface NodeType no longer has parameter multiplePlacementGroups + - Interface NodeType no longer has parameter natConfigurations + - Interface NodeType no longer has parameter natGatewayId + - Interface NodeType no longer has parameter networkSecurityRules + - Interface NodeType no longer has parameter placementProperties + - Interface NodeType no longer has parameter provisioningState + - Interface NodeType no longer has parameter secureBootEnabled + - Interface NodeType no longer has parameter securityType + - Interface NodeType no longer has parameter serviceArtifactReferenceId + - Interface NodeType no longer has parameter spotRestoreTimeout + - Interface NodeType no longer has parameter subnetId + - Interface NodeType no longer has parameter useDefaultPublicLoadBalancer + - Interface NodeType no longer has parameter useEphemeralOSDisk + - Interface NodeType no longer has parameter useTempDataDisk + - Interface NodeType no longer has parameter vmApplications + - Interface NodeType no longer has parameter vmExtensions + - Interface NodeType no longer has parameter vmImageOffer + - Interface NodeType no longer has parameter vmImagePlan + - Interface NodeType no longer has parameter vmImagePublisher + - Interface NodeType no longer has parameter vmImageResourceId + - Interface NodeType no longer has parameter vmImageSku + - Interface NodeType no longer has parameter vmImageVersion + - Interface NodeType no longer has parameter vmInstanceCount + - Interface NodeType no longer has parameter vmManagedIdentity + - Interface NodeType no longer has parameter vmSecrets + - Interface NodeType no longer has parameter vmSetupActions + - Interface NodeType no longer has parameter vmSharedGalleryImageId + - Interface NodeType no longer has parameter vmSize + - Interface NodeType no longer has parameter zones + - Interface ProxyResource no longer has parameter location + - Interface ProxyResource no longer has parameter tags + - Interface Resource no longer has parameter etag + - Interface Resource no longer has parameter location + - Interface Resource no longer has parameter tags + - Interface VmssExtension no longer has parameter autoUpgradeMinorVersion + - Interface VmssExtension no longer has parameter enableAutomaticUpgrade + - Interface VmssExtension no longer has parameter forceUpdateTag + - Interface VmssExtension no longer has parameter protectedSettings + - Interface VmssExtension no longer has parameter provisionAfterExtensions + - Interface VmssExtension no longer has parameter provisioningState + - Interface VmssExtension no longer has parameter publisher + - Interface VmssExtension no longer has parameter settings + - Interface VmssExtension no longer has parameter setupOrder + - Interface VmssExtension no longer has parameter type + - Interface VmssExtension no longer has parameter typeHandlerVersion + - Removed Type Alias UpgradeMode + - Type alias "PartitionUnion" has been changed + - Type alias "ScalingMechanismUnion" has been changed + - Type alias "ScalingTriggerUnion" has been changed + - Type alias "ServicePlacementPolicyUnion" has been changed + - Type alias "ServiceResourcePropertiesUnion" has been changed + - Removed Enum KnownUpgradeMode + ## 1.0.0-beta.4 (2025-06-20) Compared with version 1.0.0-beta.3 diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json index 5309e8c117ae..870d6d399477 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/api-extractor.json @@ -1,18 +1 @@ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - "mainEntryPointFilePath": "dist/esm/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, - "dtsRollup": { - "enabled": true, - "untrimmedFilePath": "", - "publicTrimmedFilePath": "dist/arm-servicefabricmanagedclusters.d.ts" - }, - "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, - "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } - } - } -} +{ "extends": "../../../api-extractor-base.json" } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/metadata.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/metadata.json index 29cd00da6151..d7c20c1269e8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/metadata.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/metadata.json @@ -1,4 +1,244 @@ { - "apiVersion": "2025-03-01-preview", - "emitterVersion": "0.41.0" + "apiVersion": "2025-06-01-preview", + "emitterVersion": "0.44.1", + "crossLanguageDefinitions": { + "CrossLanguagePackageId": "Microsoft.ServiceFabric", + "CrossLanguageDefinitionId": { + "@azure/arm-servicefabricmanagedclusters!OperationListResult:interface": "Microsoft.ServiceFabric.OperationListResult", + "@azure/arm-servicefabricmanagedclusters!OperationResult:interface": "Microsoft.ServiceFabric.OperationResult", + "@azure/arm-servicefabricmanagedclusters!AvailableOperationDisplay:interface": "Microsoft.ServiceFabric.AvailableOperationDisplay", + "@azure/arm-servicefabricmanagedclusters!ErrorResponse:interface": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "@azure/arm-servicefabricmanagedclusters!ErrorDetail:interface": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "@azure/arm-servicefabricmanagedclusters!ErrorAdditionalInfo:interface": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "@azure/arm-servicefabricmanagedclusters!ApplicationResource:interface": "Microsoft.ServiceFabric.ApplicationResource", + "@azure/arm-servicefabricmanagedclusters!ApplicationResourceProperties:interface": "Microsoft.ServiceFabric.ApplicationResourceProperties", + "@azure/arm-servicefabricmanagedclusters!ApplicationUserAssignedIdentity:interface": "Microsoft.ServiceFabric.ApplicationUserAssignedIdentity", + "@azure/arm-servicefabricmanagedclusters!ApplicationUpgradePolicy:interface": "Microsoft.ServiceFabric.ApplicationUpgradePolicy", + "@azure/arm-servicefabricmanagedclusters!ApplicationHealthPolicy:interface": "Microsoft.ServiceFabric.ApplicationHealthPolicy", + "@azure/arm-servicefabricmanagedclusters!ServiceTypeHealthPolicy:interface": "Microsoft.ServiceFabric.ServiceTypeHealthPolicy", + "@azure/arm-servicefabricmanagedclusters!RollingUpgradeMonitoringPolicy:interface": "Microsoft.ServiceFabric.RollingUpgradeMonitoringPolicy", + "@azure/arm-servicefabricmanagedclusters!ManagedIdentity:interface": "Microsoft.ServiceFabric.ManagedIdentity", + "@azure/arm-servicefabricmanagedclusters!UserAssignedIdentity:interface": "Microsoft.ServiceFabric.UserAssignedIdentity", + "@azure/arm-servicefabricmanagedclusters!ProxyResource:interface": "Azure.ResourceManager.CommonTypes.ProxyResource", + "@azure/arm-servicefabricmanagedclusters!Resource:interface": "Azure.ResourceManager.CommonTypes.Resource", + "@azure/arm-servicefabricmanagedclusters!SystemData:interface": "Azure.ResourceManager.CommonTypes.SystemData", + "@azure/arm-servicefabricmanagedclusters!ArmOperationStatusResourceProvisioningState:interface": "Azure.ResourceManager.ArmOperationStatus", + "@azure/arm-servicefabricmanagedclusters!ApplicationUpdateParameters:interface": "Microsoft.ServiceFabric.ApplicationUpdateParameters", + "@azure/arm-servicefabricmanagedclusters!ApplicationResourceList:interface": "Microsoft.ServiceFabric.ApplicationResourceList", + "@azure/arm-servicefabricmanagedclusters!RuntimeResumeApplicationUpgradeParameters:interface": "Microsoft.ServiceFabric.RuntimeResumeApplicationUpgradeParameters", + "@azure/arm-servicefabricmanagedclusters!RuntimeUpdateApplicationUpgradeParameters:interface": "Microsoft.ServiceFabric.RuntimeUpdateApplicationUpgradeParameters", + "@azure/arm-servicefabricmanagedclusters!RuntimeApplicationHealthPolicy:interface": "Microsoft.ServiceFabric.RuntimeApplicationHealthPolicy", + "@azure/arm-servicefabricmanagedclusters!RuntimeServiceTypeHealthPolicy:interface": "Microsoft.ServiceFabric.RuntimeServiceTypeHealthPolicy", + "@azure/arm-servicefabricmanagedclusters!RuntimeRollingUpgradeUpdateMonitoringPolicy:interface": "Microsoft.ServiceFabric.RuntimeRollingUpgradeUpdateMonitoringPolicy", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeResource:interface": "Microsoft.ServiceFabric.ApplicationTypeResource", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeResourceProperties:interface": "Microsoft.ServiceFabric.ApplicationTypeResourceProperties", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeUpdateParameters:interface": "Microsoft.ServiceFabric.ApplicationTypeUpdateParameters", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeResourceList:interface": "Microsoft.ServiceFabric.ApplicationTypeResourceList", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionResource:interface": "Microsoft.ServiceFabric.ApplicationTypeVersionResource", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionResourceProperties:interface": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceProperties", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionUpdateParameters:interface": "Microsoft.ServiceFabric.ApplicationTypeVersionUpdateParameters", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionResourceList:interface": "Microsoft.ServiceFabric.ApplicationTypeVersionResourceList", + "@azure/arm-servicefabricmanagedclusters!ServiceResource:interface": "Microsoft.ServiceFabric.ServiceResource", + "@azure/arm-servicefabricmanagedclusters!ServiceResourceProperties:interface": "Microsoft.ServiceFabric.ServiceResourceProperties", + "@azure/arm-servicefabricmanagedclusters!Partition:interface": "Microsoft.ServiceFabric.Partition", + "@azure/arm-servicefabricmanagedclusters!UniformInt64RangePartitionScheme:interface": "Microsoft.ServiceFabric.UniformInt64RangePartitionScheme", + "@azure/arm-servicefabricmanagedclusters!SingletonPartitionScheme:interface": "Microsoft.ServiceFabric.SingletonPartitionScheme", + "@azure/arm-servicefabricmanagedclusters!NamedPartitionScheme:interface": "Microsoft.ServiceFabric.NamedPartitionScheme", + "@azure/arm-servicefabricmanagedclusters!ServiceResourcePropertiesBase:interface": "Microsoft.ServiceFabric.ServiceResourcePropertiesBase", + "@azure/arm-servicefabricmanagedclusters!ServiceCorrelation:interface": "Microsoft.ServiceFabric.ServiceCorrelation", + "@azure/arm-servicefabricmanagedclusters!ServiceLoadMetric:interface": "Microsoft.ServiceFabric.ServiceLoadMetric", + "@azure/arm-servicefabricmanagedclusters!ServicePlacementPolicy:interface": "Microsoft.ServiceFabric.ServicePlacementPolicy", + "@azure/arm-servicefabricmanagedclusters!ServicePlacementInvalidDomainPolicy:interface": "Microsoft.ServiceFabric.ServicePlacementInvalidDomainPolicy", + "@azure/arm-servicefabricmanagedclusters!ServicePlacementRequiredDomainPolicy:interface": "Microsoft.ServiceFabric.ServicePlacementRequiredDomainPolicy", + "@azure/arm-servicefabricmanagedclusters!ServicePlacementPreferPrimaryDomainPolicy:interface": "Microsoft.ServiceFabric.ServicePlacementPreferPrimaryDomainPolicy", + "@azure/arm-servicefabricmanagedclusters!ServicePlacementRequireDomainDistributionPolicy:interface": "Microsoft.ServiceFabric.ServicePlacementRequireDomainDistributionPolicy", + "@azure/arm-servicefabricmanagedclusters!ServicePlacementNonPartiallyPlaceServicePolicy:interface": "Microsoft.ServiceFabric.ServicePlacementNonPartiallyPlaceServicePolicy", + "@azure/arm-servicefabricmanagedclusters!ScalingPolicy:interface": "Microsoft.ServiceFabric.ScalingPolicy", + "@azure/arm-servicefabricmanagedclusters!ScalingMechanism:interface": "Microsoft.ServiceFabric.ScalingMechanism", + "@azure/arm-servicefabricmanagedclusters!AddRemoveIncrementalNamedPartitionScalingMechanism:interface": "Microsoft.ServiceFabric.AddRemoveIncrementalNamedPartitionScalingMechanism", + "@azure/arm-servicefabricmanagedclusters!PartitionInstanceCountScaleMechanism:interface": "Microsoft.ServiceFabric.PartitionInstanceCountScaleMechanism", + "@azure/arm-servicefabricmanagedclusters!ScalingTrigger:interface": "Microsoft.ServiceFabric.ScalingTrigger", + "@azure/arm-servicefabricmanagedclusters!AveragePartitionLoadScalingTrigger:interface": "Microsoft.ServiceFabric.AveragePartitionLoadScalingTrigger", + "@azure/arm-servicefabricmanagedclusters!AverageServiceLoadScalingTrigger:interface": "Microsoft.ServiceFabric.AverageServiceLoadScalingTrigger", + "@azure/arm-servicefabricmanagedclusters!StatefulServiceProperties:interface": "Microsoft.ServiceFabric.StatefulServiceProperties", + "@azure/arm-servicefabricmanagedclusters!StatelessServiceProperties:interface": "Microsoft.ServiceFabric.StatelessServiceProperties", + "@azure/arm-servicefabricmanagedclusters!ServiceUpdateParameters:interface": "Microsoft.ServiceFabric.ServiceUpdateParameters", + "@azure/arm-servicefabricmanagedclusters!ServiceResourceList:interface": "Microsoft.ServiceFabric.ServiceResourceList", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterCodeVersionResult:interface": "Microsoft.ServiceFabric.ManagedClusterCodeVersionResult", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterVersionDetails:interface": "Microsoft.ServiceFabric.ManagedClusterVersionDetails", + "@azure/arm-servicefabricmanagedclusters!ManagedVMSize:interface": "Microsoft.ServiceFabric.ManagedVMSize", + "@azure/arm-servicefabricmanagedclusters!VMSize:interface": "Microsoft.ServiceFabric.VMSize", + "@azure/arm-servicefabricmanagedclusters!ManagedVMSizesResult:interface": "Microsoft.ServiceFabric.ManagedVMSizesResult", + "@azure/arm-servicefabricmanagedclusters!ManagedCluster:interface": "Microsoft.ServiceFabric.ManagedCluster", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterProperties:interface": "Microsoft.ServiceFabric.ManagedClusterProperties", + "@azure/arm-servicefabricmanagedclusters!LoadBalancingRule:interface": "Microsoft.ServiceFabric.LoadBalancingRule", + "@azure/arm-servicefabricmanagedclusters!NetworkSecurityRule:interface": "Microsoft.ServiceFabric.NetworkSecurityRule", + "@azure/arm-servicefabricmanagedclusters!ClientCertificate:interface": "Microsoft.ServiceFabric.ClientCertificate", + "@azure/arm-servicefabricmanagedclusters!AzureActiveDirectory:interface": "Microsoft.ServiceFabric.AzureActiveDirectory", + "@azure/arm-servicefabricmanagedclusters!SettingsSectionDescription:interface": "Microsoft.ServiceFabric.SettingsSectionDescription", + "@azure/arm-servicefabricmanagedclusters!SettingsParameterDescription:interface": "Microsoft.ServiceFabric.SettingsParameterDescription", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionsCleanupPolicy:interface": "Microsoft.ServiceFabric.ApplicationTypeVersionsCleanupPolicy", + "@azure/arm-servicefabricmanagedclusters!IpTag:interface": "Microsoft.ServiceFabric.IpTag", + "@azure/arm-servicefabricmanagedclusters!Subnet:interface": "Microsoft.ServiceFabric.Subnet", + "@azure/arm-servicefabricmanagedclusters!ServiceEndpoint:interface": "Microsoft.ServiceFabric.ServiceEndpoint", + "@azure/arm-servicefabricmanagedclusters!ClusterUpgradePolicy:interface": "Microsoft.ServiceFabric.ClusterUpgradePolicy", + "@azure/arm-servicefabricmanagedclusters!ClusterHealthPolicy:interface": "Microsoft.ServiceFabric.ClusterHealthPolicy", + "@azure/arm-servicefabricmanagedclusters!ClusterUpgradeDeltaHealthPolicy:interface": "Microsoft.ServiceFabric.ClusterUpgradeDeltaHealthPolicy", + "@azure/arm-servicefabricmanagedclusters!ClusterMonitoringPolicy:interface": "Microsoft.ServiceFabric.ClusterMonitoringPolicy", + "@azure/arm-servicefabricmanagedclusters!Sku:interface": "Microsoft.ServiceFabric.Sku", + "@azure/arm-servicefabricmanagedclusters!TrackedResource:interface": "Azure.ResourceManager.CommonTypes.TrackedResource", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterUpdateParameters:interface": "Microsoft.ServiceFabric.ManagedClusterUpdateParameters", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-servicefabricmanagedclusters!FaultSimulationIdContent:interface": "Microsoft.ServiceFabric.FaultSimulationIdContent", + "@azure/arm-servicefabricmanagedclusters!FaultSimulation:interface": "Microsoft.ServiceFabric.FaultSimulation", + "@azure/arm-servicefabricmanagedclusters!FaultSimulationDetails:interface": "Microsoft.ServiceFabric.FaultSimulationDetails", + "@azure/arm-servicefabricmanagedclusters!NodeTypeFaultSimulation:interface": "Microsoft.ServiceFabric.NodeTypeFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!FaultSimulationContent:interface": "Microsoft.ServiceFabric.FaultSimulationContent", + "@azure/arm-servicefabricmanagedclusters!FaultSimulationConstraints:interface": "Microsoft.ServiceFabric.FaultSimulationConstraints", + "@azure/arm-servicefabricmanagedclusters!ZoneFaultSimulationContent:interface": "Microsoft.ServiceFabric.ZoneFaultSimulationContent", + "@azure/arm-servicefabricmanagedclusters!FaultSimulationListResult:interface": "Microsoft.ServiceFabric.FaultSimulationListResult", + "@azure/arm-servicefabricmanagedclusters!FaultSimulationContentWrapper:interface": "Microsoft.ServiceFabric.FaultSimulationContentWrapper", + "@azure/arm-servicefabricmanagedclusters!ManagedAzResiliencyStatus:interface": "Microsoft.ServiceFabric.ManagedAzResiliencyStatusContent", + "@azure/arm-servicefabricmanagedclusters!ResourceAzStatus:interface": "Microsoft.ServiceFabric.ResourceAzStatus", + "@azure/arm-servicefabricmanagedclusters!ManagedMaintenanceWindowStatus:interface": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatusContent", + "@azure/arm-servicefabricmanagedclusters!NodeType:interface": "Microsoft.ServiceFabric.NodeType", + "@azure/arm-servicefabricmanagedclusters!NodeTypeProperties:interface": "Microsoft.ServiceFabric.NodeTypeProperties", + "@azure/arm-servicefabricmanagedclusters!EndpointRangeDescription:interface": "Microsoft.ServiceFabric.EndpointRangeDescription", + "@azure/arm-servicefabricmanagedclusters!VaultSecretGroup:interface": "Microsoft.ServiceFabric.VaultSecretGroup", + "@azure/arm-servicefabricmanagedclusters!SubResource:interface": "Microsoft.ServiceFabric.SubResource", + "@azure/arm-servicefabricmanagedclusters!VaultCertificate:interface": "Microsoft.ServiceFabric.VaultCertificate", + "@azure/arm-servicefabricmanagedclusters!VMSSExtension:interface": "Microsoft.ServiceFabric.VMSSExtension", + "@azure/arm-servicefabricmanagedclusters!VMSSExtensionProperties:interface": "Microsoft.ServiceFabric.VMSSExtensionProperties", + "@azure/arm-servicefabricmanagedclusters!VmManagedIdentity:interface": "Microsoft.ServiceFabric.VmManagedIdentity", + "@azure/arm-servicefabricmanagedclusters!FrontendConfiguration:interface": "Microsoft.ServiceFabric.FrontendConfiguration", + "@azure/arm-servicefabricmanagedclusters!VmssDataDisk:interface": "Microsoft.ServiceFabric.VmssDataDisk", + "@azure/arm-servicefabricmanagedclusters!NodeTypeNatConfig:interface": "Microsoft.ServiceFabric.NodeTypeNatConfig", + "@azure/arm-servicefabricmanagedclusters!VmImagePlan:interface": "Microsoft.ServiceFabric.VmImagePlan", + "@azure/arm-servicefabricmanagedclusters!AdditionalNetworkInterfaceConfiguration:interface": "Microsoft.ServiceFabric.AdditionalNetworkInterfaceConfiguration", + "@azure/arm-servicefabricmanagedclusters!IpConfiguration:interface": "Microsoft.ServiceFabric.IpConfiguration", + "@azure/arm-servicefabricmanagedclusters!IPConfigurationPublicIPAddressConfiguration:interface": "Microsoft.ServiceFabric.PublicIPAddressConfiguration", + "@azure/arm-servicefabricmanagedclusters!VmApplication:interface": "Microsoft.ServiceFabric.VmApplication", + "@azure/arm-servicefabricmanagedclusters!NodeTypeSku:interface": "Microsoft.ServiceFabric.NodeTypeSku", + "@azure/arm-servicefabricmanagedclusters!NodeTypeUpdateParameters:interface": "Microsoft.ServiceFabric.NodeTypeUpdateParameters", + "@azure/arm-servicefabricmanagedclusters!NodeTypeListResult:interface": "Azure.ResourceManager.ResourceListResult", + "@azure/arm-servicefabricmanagedclusters!NodeTypeActionParameters:interface": "Microsoft.ServiceFabric.NodeTypeActionParameters", + "@azure/arm-servicefabricmanagedclusters!NodeTypeListSkuResult:interface": "Microsoft.ServiceFabric.NodeTypeListSkuResult", + "@azure/arm-servicefabricmanagedclusters!NodeTypeAvailableSku:interface": "Microsoft.ServiceFabric.NodeTypeAvailableSku", + "@azure/arm-servicefabricmanagedclusters!NodeTypeSupportedSku:interface": "Microsoft.ServiceFabric.NodeTypeSupportedSku", + "@azure/arm-servicefabricmanagedclusters!NodeTypeSkuCapacity:interface": "Microsoft.ServiceFabric.NodeTypeSkuCapacity", + "@azure/arm-servicefabricmanagedclusters!LongRunningOperationResult:interface": "Microsoft.ServiceFabric.LongRunningOperationResult", + "@azure/arm-servicefabricmanagedclusters!ErrorModelError:interface": "Microsoft.ServiceFabric.ErrorModelError", + "@azure/arm-servicefabricmanagedclusters!KnownFailureAction:enum": "Microsoft.ServiceFabric.FailureAction", + "@azure/arm-servicefabricmanagedclusters!KnownRollingUpgradeMode:enum": "Microsoft.ServiceFabric.RollingUpgradeMode", + "@azure/arm-servicefabricmanagedclusters!KnownManagedIdentityType:enum": "Microsoft.ServiceFabric.ManagedIdentityType", + "@azure/arm-servicefabricmanagedclusters!KnowncreatedByType:enum": "Azure.ResourceManager.CommonTypes.createdByType", + "@azure/arm-servicefabricmanagedclusters!KnownResourceProvisioningState:enum": "Azure.ResourceManager.ResourceProvisioningState", + "@azure/arm-servicefabricmanagedclusters!KnownRuntimeUpgradeKind:enum": "Microsoft.ServiceFabric.RuntimeUpgradeKind", + "@azure/arm-servicefabricmanagedclusters!KnownRuntimeRollingUpgradeMode:enum": "Microsoft.ServiceFabric.RuntimeRollingUpgradeMode", + "@azure/arm-servicefabricmanagedclusters!KnownRuntimeFailureAction:enum": "Microsoft.ServiceFabric.RuntimeFailureAction", + "@azure/arm-servicefabricmanagedclusters!KnownServiceKind:enum": "Microsoft.ServiceFabric.ServiceKind", + "@azure/arm-servicefabricmanagedclusters!KnownPartitionScheme:enum": "Microsoft.ServiceFabric.PartitionScheme", + "@azure/arm-servicefabricmanagedclusters!KnownServicePackageActivationMode:enum": "Microsoft.ServiceFabric.ServicePackageActivationMode", + "@azure/arm-servicefabricmanagedclusters!KnownServiceCorrelationScheme:enum": "Microsoft.ServiceFabric.ServiceCorrelationScheme", + "@azure/arm-servicefabricmanagedclusters!KnownServiceLoadMetricWeight:enum": "Microsoft.ServiceFabric.ServiceLoadMetricWeight", + "@azure/arm-servicefabricmanagedclusters!KnownServicePlacementPolicyType:enum": "Microsoft.ServiceFabric.ServicePlacementPolicyType", + "@azure/arm-servicefabricmanagedclusters!KnownMoveCost:enum": "Microsoft.ServiceFabric.MoveCost", + "@azure/arm-servicefabricmanagedclusters!KnownServiceScalingMechanismKind:enum": "Microsoft.ServiceFabric.ServiceScalingMechanismKind", + "@azure/arm-servicefabricmanagedclusters!KnownServiceScalingTriggerKind:enum": "Microsoft.ServiceFabric.ServiceScalingTriggerKind", + "@azure/arm-servicefabricmanagedclusters!KnownOsType:enum": "Microsoft.ServiceFabric.OsType", + "@azure/arm-servicefabricmanagedclusters!KnownManagedClusterVersionEnvironment:enum": "Microsoft.ServiceFabric.ManagedClusterVersionEnvironment", + "@azure/arm-servicefabricmanagedclusters!KnownClusterState:enum": "Microsoft.ServiceFabric.ClusterState", + "@azure/arm-servicefabricmanagedclusters!KnownProtocol:enum": "Microsoft.ServiceFabric.Protocol", + "@azure/arm-servicefabricmanagedclusters!KnownProbeProtocol:enum": "Microsoft.ServiceFabric.ProbeProtocol", + "@azure/arm-servicefabricmanagedclusters!KnownNsgProtocol:enum": "Microsoft.ServiceFabric.NsgProtocol", + "@azure/arm-servicefabricmanagedclusters!KnownAccess:enum": "Microsoft.ServiceFabric.Access", + "@azure/arm-servicefabricmanagedclusters!KnownDirection:enum": "Microsoft.ServiceFabric.Direction", + "@azure/arm-servicefabricmanagedclusters!KnownManagedResourceProvisioningState:enum": "Microsoft.ServiceFabric.ManagedResourceProvisioningState", + "@azure/arm-servicefabricmanagedclusters!KnownClusterUpgradeMode:enum": "Microsoft.ServiceFabric.ClusterUpgradeMode", + "@azure/arm-servicefabricmanagedclusters!KnownClusterUpgradeCadence:enum": "Microsoft.ServiceFabric.ClusterUpgradeCadence", + "@azure/arm-servicefabricmanagedclusters!KnownManagedClusterAddOnFeature:enum": "Microsoft.ServiceFabric.ManagedClusterAddOnFeature", + "@azure/arm-servicefabricmanagedclusters!KnownPrivateEndpointNetworkPolicies:enum": "Microsoft.ServiceFabric.PrivateEndpointNetworkPolicies", + "@azure/arm-servicefabricmanagedclusters!KnownPrivateLinkServiceNetworkPolicies:enum": "Microsoft.ServiceFabric.PrivateLinkServiceNetworkPolicies", + "@azure/arm-servicefabricmanagedclusters!KnownZonalUpdateMode:enum": "Microsoft.ServiceFabric.ZonalUpdateMode", + "@azure/arm-servicefabricmanagedclusters!KnownAutoGeneratedDomainNameLabelScope:enum": "Microsoft.ServiceFabric.AutoGeneratedDomainNameLabelScope", + "@azure/arm-servicefabricmanagedclusters!KnownSkuName:enum": "Microsoft.ServiceFabric.SkuName", + "@azure/arm-servicefabricmanagedclusters!KnownFaultSimulationStatus:enum": "Microsoft.ServiceFabric.FaultSimulationStatus", + "@azure/arm-servicefabricmanagedclusters!KnownSfmcOperationStatus:enum": "Microsoft.ServiceFabric.SfmcOperationStatus", + "@azure/arm-servicefabricmanagedclusters!KnownFaultKind:enum": "Microsoft.ServiceFabric.FaultKind", + "@azure/arm-servicefabricmanagedclusters!KnownDiskType:enum": "Microsoft.ServiceFabric.DiskType", + "@azure/arm-servicefabricmanagedclusters!KnownVmssExtensionSetupOrder:enum": "Microsoft.ServiceFabric.VmssExtensionSetupOrder", + "@azure/arm-servicefabricmanagedclusters!KnownIPAddressType:enum": "Microsoft.ServiceFabric.IPAddressType", + "@azure/arm-servicefabricmanagedclusters!KnownEvictionPolicyType:enum": "Microsoft.ServiceFabric.EvictionPolicyType", + "@azure/arm-servicefabricmanagedclusters!KnownVmSetupAction:enum": "Microsoft.ServiceFabric.VmSetupAction", + "@azure/arm-servicefabricmanagedclusters!KnownSecurityType:enum": "Microsoft.ServiceFabric.SecurityType", + "@azure/arm-servicefabricmanagedclusters!KnownSecurityEncryptionType:enum": "Microsoft.ServiceFabric.SecurityEncryptionType", + "@azure/arm-servicefabricmanagedclusters!KnownPrivateIPAddressVersion:enum": "Microsoft.ServiceFabric.PrivateIPAddressVersion", + "@azure/arm-servicefabricmanagedclusters!KnownPublicIPAddressVersion:enum": "Microsoft.ServiceFabric.PublicIPAddressVersion", + "@azure/arm-servicefabricmanagedclusters!KnownUpdateType:enum": "Microsoft.ServiceFabric.UpdateType", + "@azure/arm-servicefabricmanagedclusters!KnownNodeTypeSkuScaleType:enum": "Microsoft.ServiceFabric.NodeTypeSkuScaleType", + "@azure/arm-servicefabricmanagedclusters!KnownVersions:enum": "Microsoft.ServiceFabric.Versions", + "@azure/arm-servicefabricmanagedclusters!OperationStatusOperations#get:member": "Microsoft.ServiceFabric.OperationStatus.get", + "@azure/arm-servicefabricmanagedclusters!OperationResultsOperations#get:member": "Microsoft.ServiceFabric.OperationResults.get", + "@azure/arm-servicefabricmanagedclusters!NodeTypeSkusOperations#list:member": "Microsoft.ServiceFabric.NodeTypeSkus.list", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#listFaultSimulation:member": "Microsoft.ServiceFabric.NodeTypes.listFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#getFaultSimulation:member": "Microsoft.ServiceFabric.NodeTypes.getFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#stopFaultSimulation:member": "Microsoft.ServiceFabric.NodeTypes.stopFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#startFaultSimulation:member": "Microsoft.ServiceFabric.NodeTypes.startFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#start:member": "Microsoft.ServiceFabric.NodeTypes.start", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#restart:member": "Microsoft.ServiceFabric.NodeTypes.restart", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#reimage:member": "Microsoft.ServiceFabric.NodeTypes.reimage", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#redeploy:member": "Microsoft.ServiceFabric.NodeTypes.redeploy", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#deleteNode:member": "Microsoft.ServiceFabric.NodeTypes.deleteNode", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#deallocate:member": "Microsoft.ServiceFabric.NodeTypes.deallocate", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#listByManagedClusters:member": "Microsoft.ServiceFabric.NodeTypes.listByManagedClusters", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#delete:member": "Microsoft.ServiceFabric.NodeTypes.delete", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#update:member": "Microsoft.ServiceFabric.NodeTypes.update", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#createOrUpdate:member": "Microsoft.ServiceFabric.NodeTypes.createOrUpdate", + "@azure/arm-servicefabricmanagedclusters!NodeTypesOperations#get:member": "Microsoft.ServiceFabric.NodeTypes.get", + "@azure/arm-servicefabricmanagedclusters!ManagedMaintenanceWindowStatusOperations#get:member": "Microsoft.ServiceFabric.ManagedMaintenanceWindowStatus.get", + "@azure/arm-servicefabricmanagedclusters!ManagedApplyMaintenanceWindowOperations#post:member": "Microsoft.ServiceFabric.ManagedApplyMaintenanceWindow.post", + "@azure/arm-servicefabricmanagedclusters!ManagedAzResiliencyStatusOperations#get:member": "Microsoft.ServiceFabric.ManagedAzResiliencyStatus.get", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#stopFaultSimulation:member": "Microsoft.ServiceFabric.ManagedClusters.stopFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#startFaultSimulation:member": "Microsoft.ServiceFabric.ManagedClusters.startFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#listFaultSimulation:member": "Microsoft.ServiceFabric.ManagedClusters.listFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#getFaultSimulation:member": "Microsoft.ServiceFabric.ManagedClusters.getFaultSimulation", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#listBySubscription:member": "Microsoft.ServiceFabric.ManagedClusters.listBySubscription", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#listByResourceGroup:member": "Microsoft.ServiceFabric.ManagedClusters.listByResourceGroup", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#delete:member": "Microsoft.ServiceFabric.ManagedClusters.delete", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#update:member": "Microsoft.ServiceFabric.ManagedClusters.update", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#createOrUpdate:member": "Microsoft.ServiceFabric.ManagedClusters.createOrUpdate", + "@azure/arm-servicefabricmanagedclusters!ManagedClustersOperations#get:member": "Microsoft.ServiceFabric.ManagedClusters.get", + "@azure/arm-servicefabricmanagedclusters!ManagedUnsupportedVMSizesOperations#list:member": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.list", + "@azure/arm-servicefabricmanagedclusters!ManagedUnsupportedVMSizesOperations#get:member": "Microsoft.ServiceFabric.ManagedUnsupportedVMSizes.get", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterVersionOperations#listByEnvironment:member": "Microsoft.ServiceFabric.ManagedClusterVersion.listByEnvironment", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterVersionOperations#getByEnvironment:member": "Microsoft.ServiceFabric.ManagedClusterVersion.getByEnvironment", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterVersionOperations#list:member": "Microsoft.ServiceFabric.ManagedClusterVersion.list", + "@azure/arm-servicefabricmanagedclusters!ManagedClusterVersionOperations#get:member": "Microsoft.ServiceFabric.ManagedClusterVersion.get", + "@azure/arm-servicefabricmanagedclusters!ServicesOperations#listByApplications:member": "Microsoft.ServiceFabric.Services.listByApplications", + "@azure/arm-servicefabricmanagedclusters!ServicesOperations#delete:member": "Microsoft.ServiceFabric.Services.delete", + "@azure/arm-servicefabricmanagedclusters!ServicesOperations#update:member": "Microsoft.ServiceFabric.Services.update", + "@azure/arm-servicefabricmanagedclusters!ServicesOperations#createOrUpdate:member": "Microsoft.ServiceFabric.Services.createOrUpdate", + "@azure/arm-servicefabricmanagedclusters!ServicesOperations#get:member": "Microsoft.ServiceFabric.Services.get", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionsOperations#listByApplicationTypes:member": "Microsoft.ServiceFabric.ApplicationTypeVersions.listByApplicationTypes", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionsOperations#delete:member": "Microsoft.ServiceFabric.ApplicationTypeVersions.delete", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionsOperations#update:member": "Microsoft.ServiceFabric.ApplicationTypeVersions.update", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionsOperations#createOrUpdate:member": "Microsoft.ServiceFabric.ApplicationTypeVersions.createOrUpdate", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypeVersionsOperations#get:member": "Microsoft.ServiceFabric.ApplicationTypeVersions.get", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypesOperations#list:member": "Microsoft.ServiceFabric.ApplicationTypes.list", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypesOperations#delete:member": "Microsoft.ServiceFabric.ApplicationTypes.delete", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypesOperations#update:member": "Microsoft.ServiceFabric.ApplicationTypes.update", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypesOperations#createOrUpdate:member": "Microsoft.ServiceFabric.ApplicationTypes.createOrUpdate", + "@azure/arm-servicefabricmanagedclusters!ApplicationTypesOperations#get:member": "Microsoft.ServiceFabric.ApplicationTypes.get", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#updateUpgrade:member": "Microsoft.ServiceFabric.Applications.updateUpgrade", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#startRollback:member": "Microsoft.ServiceFabric.Applications.startRollback", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#resumeUpgrade:member": "Microsoft.ServiceFabric.Applications.resumeUpgrade", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#readUpgrade:member": "Microsoft.ServiceFabric.Applications.readUpgrade", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#list:member": "Microsoft.ServiceFabric.Applications.list", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#delete:member": "Microsoft.ServiceFabric.Applications.delete", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#update:member": "Microsoft.ServiceFabric.Applications.update", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#createOrUpdate:member": "Microsoft.ServiceFabric.Applications.createOrUpdate", + "@azure/arm-servicefabricmanagedclusters!ApplicationsOperations#get:member": "Microsoft.ServiceFabric.Applications.get", + "@azure/arm-servicefabricmanagedclusters!OperationsOperations#list:member": "Microsoft.ServiceFabric.Operations.list" + } + } } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json index 7517b0c09af0..456912612237 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/package.json @@ -1,6 +1,6 @@ { "name": "@azure/arm-servicefabricmanagedclusters", - "version": "1.0.0-beta.4", + "version": "1.0.0-beta.5", "description": "A generated SDK for ServiceFabricManagedClustersManagementClient.", "engines": { "node": ">=20.0.0" @@ -57,9 +57,7 @@ "dist/", "!dist/**/*.d.*ts.map", "README.md", - "LICENSE", - "review/*", - "CHANGELOG.md" + "LICENSE" ], "sdk-type": "mgmt", "repository": "github:Azure/azure-sdk-for-js", @@ -77,46 +75,47 @@ ] }, "dependencies": { - "@azure/core-util": "^1.11.0", - "@azure-rest/core-client": "^2.1.0", + "@azure/core-util": "^1.12.0", + "@azure-rest/core-client": "^2.3.1", "@azure/abort-controller": "^2.1.2", "@azure/core-auth": "^1.9.0", - "@azure/core-lro": "^3.0.0", - "@azure/core-rest-pipeline": "^1.18.2", - "@azure/logger": "^1.1.4", + "@azure/core-lro": "^3.1.0", + "@azure/core-rest-pipeline": "^1.20.0", + "@azure/logger": "^1.2.0", "tslib": "^2.8.1" }, "devDependencies": { - "@azure-tools/test-credential": "workspace:^", - "@azure-tools/test-recorder": "workspace:^", - "@azure-tools/test-utils-vitest": "workspace:^", - "@azure/dev-tool": "workspace:^", - "@azure/eslint-plugin-azure-sdk": "workspace:^", - "@azure/identity": "catalog:internal", - "@types/node": "catalog:", - "eslint": "catalog:", - "@vitest/browser": "catalog:testing", - "@vitest/coverage-istanbul": "catalog:testing", - "dotenv": "catalog:testing", - "playwright": "catalog:testing", - "typescript": "catalog:", - "vitest": "catalog:testing" + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure/identity": "^4.9.0", + "@types/node": "^20.0.0", + "eslint": "^9.9.0", + "@vitest/browser": "^3.0.9", + "@vitest/coverage-istanbul": "^3.0.9", + "dotenv": "^16.0.0", + "playwright": "^1.52.0", + "typescript": "~5.8.2", + "vitest": "^3.0.9" }, "scripts": { - "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", - "build:samples": "tsc -p tsconfig.samples.json", - "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", - "clean": "dev-tool run vendored rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", - "execute:samples": "dev-tool samples run samples-dev", - "extract-api": "dev-tool run vendored rimraf review && dev-tool run extract-api", - "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", - "generate:client": "echo skipped", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "extract-api": "rimraf review && dev-tool run extract-api", + "pack": "npm pack 2>&1", "lint": "echo skipped", "lint:fix": "echo skipped", - "pack": "pnpm pack 2>&1", - "test": "npm run test:node && npm run test:browser", + "build:samples": "tsc -p tsconfig.samples.json && dev-tool samples publish -f", + "check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "execute:samples": "dev-tool samples run samples-dev", + "format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\" \"samples-dev/*.ts\"", + "generate:client": "echo skipped", "test:browser": "dev-tool run build-test && dev-tool run test:vitest --browser", - "test:node": "dev-tool run build-test --no-browser-test && dev-tool run test:vitest", + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", + "test:node": "dev-tool run test:vitest", + "test:node:esm": "dev-tool run test:vitest --esm", + "test": "npm run test:node && npm run test:browser", "update-snippets": "dev-tool run update-snippets" }, "//sampleConfiguration": { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypeVersions-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypeVersions-node.api.md index d4a61af77392..76328f99713d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypeVersions-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypeVersions-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationTypeName: string, version: string, options?: ApplicationTypeVersionsDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypes-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypes-node.api.md index 018c7e723c85..f7b7afaa3358 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypes-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applicationTypes-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationTypeName: string, options?: ApplicationTypesDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applications-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applications-node.api.md index 79661bf12762..162824208392 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applications-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-applications-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsDeleteOptionalParams): PollerLike, void>; @@ -49,6 +49,11 @@ export interface ApplicationsStartRollbackOptionalParams extends OperationOption export interface ApplicationsUpdateOptionalParams extends OperationOptions { } +// @public +export interface ApplicationsUpdateUpgradeOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + // @public export function createOrUpdate(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationResource, options?: ApplicationsCreateOrUpdateOptionalParams): PollerLike, ApplicationResource>; @@ -70,6 +75,9 @@ export function startRollback(context: ServiceFabricManagedClustersManagementCon // @public export function update(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationUpdateParameters, options?: ApplicationsUpdateOptionalParams): Promise; +// @public +export function updateUpgrade(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationName: string, parameters: RuntimeUpdateApplicationUpgradeParameters, options?: ApplicationsUpdateUpgradeOptionalParams): PollerLike, void>; + // (No @packageDocumentation comment for this package) ``` diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedApplyMaintenanceWindow-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedApplyMaintenanceWindow-node.api.md index 38a742d34d93..a39d941c048f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedApplyMaintenanceWindow-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedApplyMaintenanceWindow-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export interface ManagedApplyMaintenanceWindowPostOptionalParams extends OperationOptions { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedAzResiliencyStatus-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedAzResiliencyStatus-node.api.md index cd8c6c937742..fd1419738818 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedAzResiliencyStatus-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedAzResiliencyStatus-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function get(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, options?: ManagedAzResiliencyStatusGetOptionalParams): Promise; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusterVersion-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusterVersion-node.api.md index 7cf4bde3a34d..84605d9d055c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusterVersion-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusterVersion-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function get(context: ServiceFabricManagedClustersManagementContext, location: string, clusterVersion: string, options?: ManagedClusterVersionGetOptionalParams): Promise; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusters-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusters-node.api.md index d8573661bb0e..a017e6390699 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusters-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedClusters-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, options?: ManagedClustersDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedMaintenanceWindowStatus-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedMaintenanceWindowStatus-node.api.md index 49f7669e3547..0c093efff5fd 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedMaintenanceWindowStatus-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedMaintenanceWindowStatus-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function get(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, options?: ManagedMaintenanceWindowStatusGetOptionalParams): Promise; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedUnsupportedVMSizes-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedUnsupportedVMSizes-node.api.md index 6cd4488b7318..ceee0237a355 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedUnsupportedVMSizes-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-managedUnsupportedVMSizes-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function get(context: ServiceFabricManagedClustersManagementContext, location: string, vmSize: string, options?: ManagedUnsupportedVMSizesGetOptionalParams): Promise; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-node.api.md index c524a264e4f7..7f592956a955 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-node.api.md @@ -4,9 +4,9 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { ClientOptions } from '@azure-rest/core-client'; -import { TokenCredential } from '@azure/core-auth'; +import type { Client } from '@azure-rest/core-client'; +import type { ClientOptions } from '@azure-rest/core-client'; +import type { TokenCredential } from '@azure/core-auth'; // @public export function createServiceFabricManagedClustersManagement(credential: TokenCredential, subscriptionId: string, options?: ServiceFabricManagedClustersManagementClientOptionalParams): ServiceFabricManagedClustersManagementContext; @@ -14,6 +14,7 @@ export function createServiceFabricManagedClustersManagement(credential: TokenCr // @public export interface ServiceFabricManagedClustersManagementClientOptionalParams extends ClientOptions { apiVersion?: string; + cloudSetting?: AzureSupportedClouds; } // @public diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypeSkus-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypeSkus-node.api.md index ce82224b1cde..7f5286b4e01a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypeSkus-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypeSkus-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function list(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypeSkusListOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypes-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypes-node.api.md index 6e6b7391528f..67733f91438c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypes-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-nodeTypes-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, nodeTypeName: string, options?: NodeTypesDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationResults-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationResults-node.api.md index 7daa0171fc3f..57338715a431 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationResults-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationResults-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function get(context: ServiceFabricManagedClustersManagementContext, location: string, operationId: string, options?: OperationResultsGetOptionalParams): Promise; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationStatus-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationStatus-node.api.md index ccab8c47bbd6..0f3f896d8787 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationStatus-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operationStatus-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function get(context: ServiceFabricManagedClustersManagementContext, location: string, operationId: string, options?: OperationStatusGetOptionalParams): Promise; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operations-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operations-node.api.md index 41287d4e42f8..d2e97e7e988d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operations-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-operations-node.api.md @@ -4,8 +4,8 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; // @public export function list(context: ServiceFabricManagedClustersManagementContext, options?: OperationsListOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-services-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-services-node.api.md index 1a66036b7d5b..96cf6ced1330 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-services-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-api-services-node.api.md @@ -4,10 +4,10 @@ ```ts -import { Client } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PollerLike } from '@azure/core-lro'; +import type { Client } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PollerLike } from '@azure/core-lro'; // @public export function $delete(context: ServiceFabricManagedClustersManagementContext, resourceGroupName: string, clusterName: string, applicationName: string, serviceName: string, options?: ServicesDeleteOptionalParams): PollerLike, void>; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-models-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-models-node.api.md index 94416d08d6d9..09a1fd42ff0d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-models-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-models-node.api.md @@ -526,6 +526,24 @@ export enum KnownRollingUpgradeMode { UnmonitoredAuto = "UnmonitoredAuto" } +// @public +export enum KnownRuntimeFailureAction { + Manual = "Manual", + Rollback = "Rollback" +} + +// @public +export enum KnownRuntimeRollingUpgradeMode { + Monitored = "Monitored", + UnmonitoredAuto = "UnmonitoredAuto", + UnmonitoredManual = "UnmonitoredManual" +} + +// @public +export enum KnownRuntimeUpgradeKind { + Rolling = "Rolling" +} + // @public export enum KnownSecurityEncryptionType { DiskWithVMGuestState = "DiskWithVMGuestState", @@ -611,8 +629,8 @@ export enum KnownUpdateType { // @public export enum KnownVersions { V20241101Preview = "2024-11-01-preview", - // (undocumented) - V20250301Preview = "2025-03-01-preview" + V20250301Preview = "2025-03-01-preview", + V20250601Preview = "2025-06-01-preview" } // @public @@ -701,6 +719,7 @@ export interface ManagedClusterProperties { enableAutoOSUpgrade?: boolean; enableHttpGatewayExclusiveAuthMode?: boolean; enableIpv6?: boolean; + enableOutboundOnlyNodeTypes?: boolean; enableServicePublicIP?: boolean; fabricSettings?: SettingsSectionDescription[]; readonly fqdn?: string; @@ -854,6 +873,7 @@ export interface NodeTypeProperties { evictionPolicy?: EvictionPolicyType; frontendConfigurations?: FrontendConfiguration[]; hostGroupId?: string; + isOutboundOnly?: boolean; isPrimary: boolean; isSpotVM?: boolean; isStateless?: boolean; @@ -1006,11 +1026,57 @@ export interface RollingUpgradeMonitoringPolicy { upgradeTimeout: string; } +// @public +export interface RuntimeApplicationHealthPolicy { + considerWarningAsError: boolean; + defaultServiceTypeHealthPolicy?: RuntimeServiceTypeHealthPolicy; + maxPercentUnhealthyDeployedApplications: number; + serviceTypeHealthPolicyMap?: Record; +} + +// @public +export type RuntimeFailureAction = string; + // @public export interface RuntimeResumeApplicationUpgradeParameters { upgradeDomainName?: string; } +// @public +export type RuntimeRollingUpgradeMode = string; + +// @public +export interface RuntimeRollingUpgradeUpdateMonitoringPolicy { + failureAction?: RuntimeFailureAction; + forceRestart?: boolean; + healthCheckRetryTimeoutInMilliseconds?: string; + healthCheckStableDurationInMilliseconds?: string; + healthCheckWaitDurationInMilliseconds?: string; + instanceCloseDelayDurationInSeconds?: number; + replicaSetCheckTimeoutInMilliseconds?: number; + rollingUpgradeMode: RuntimeRollingUpgradeMode; + upgradeDomainTimeoutInMilliseconds?: string; + upgradeTimeoutInMilliseconds?: string; +} + +// @public +export interface RuntimeServiceTypeHealthPolicy { + maxPercentUnhealthyPartitionsPerService: number; + maxPercentUnhealthyReplicasPerPartition: number; + maxPercentUnhealthyServices: number; +} + +// @public +export interface RuntimeUpdateApplicationUpgradeParameters { + applicationHealthPolicy?: RuntimeApplicationHealthPolicy; + name: string; + updateDescription?: RuntimeRollingUpgradeUpdateMonitoringPolicy; + upgradeKind: RuntimeUpgradeKind; +} + +// @public +export type RuntimeUpgradeKind = string; + // @public export interface ScalingMechanism { // (undocumented) @@ -1053,6 +1119,7 @@ export type ServiceCorrelationScheme = string; // @public export interface ServiceEndpoint { locations?: string[]; + networkIdentifier?: string; service: string; } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-node.api.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-node.api.md index 8c508edb89f9..2a9f936cf9fb 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-node.api.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/review/arm-servicefabricmanagedclusters-node.api.md @@ -4,14 +4,14 @@ ```ts -import { AbortSignalLike } from '@azure/abort-controller'; -import { ClientOptions } from '@azure-rest/core-client'; -import { OperationOptions } from '@azure-rest/core-client'; -import { OperationState } from '@azure/core-lro'; -import { PathUncheckedResponse } from '@azure-rest/core-client'; -import { Pipeline } from '@azure/core-rest-pipeline'; -import { PollerLike } from '@azure/core-lro'; -import { TokenCredential } from '@azure/core-auth'; +import type { AbortSignalLike } from '@azure/abort-controller'; +import type { ClientOptions } from '@azure-rest/core-client'; +import type { OperationOptions } from '@azure-rest/core-client'; +import type { OperationState } from '@azure/core-lro'; +import type { PathUncheckedResponse } from '@azure-rest/core-client'; +import type { Pipeline } from '@azure/core-rest-pipeline'; +import type { PollerLike } from '@azure/core-lro'; +import type { TokenCredential } from '@azure/core-auth'; // @public export type Access = string; @@ -85,6 +85,7 @@ export interface ApplicationsOperations { resumeUpgrade: (resourceGroupName: string, clusterName: string, applicationName: string, parameters: RuntimeResumeApplicationUpgradeParameters, options?: ApplicationsResumeUpgradeOptionalParams) => PollerLike, void>; startRollback: (resourceGroupName: string, clusterName: string, applicationName: string, options?: ApplicationsStartRollbackOptionalParams) => PollerLike, void>; update: (resourceGroupName: string, clusterName: string, applicationName: string, parameters: ApplicationUpdateParameters, options?: ApplicationsUpdateOptionalParams) => Promise; + updateUpgrade: (resourceGroupName: string, clusterName: string, applicationName: string, parameters: RuntimeUpdateApplicationUpgradeParameters, options?: ApplicationsUpdateUpgradeOptionalParams) => PollerLike, void>; } // @public @@ -106,6 +107,11 @@ export interface ApplicationsStartRollbackOptionalParams extends OperationOption export interface ApplicationsUpdateOptionalParams extends OperationOptions { } +// @public +export interface ApplicationsUpdateUpgradeOptionalParams extends OperationOptions { + updateIntervalInMs?: number; +} + // @public export interface ApplicationTypeResource extends ProxyResource { location?: string; @@ -266,6 +272,16 @@ export interface AzureActiveDirectory { tenantId?: string; } +// @public +export enum AzureClouds { + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT" +} + +// @public +export type AzureSupportedClouds = `${AzureClouds}`; + // @public export interface ClientCertificate { commonName?: string; @@ -650,6 +666,24 @@ export enum KnownRollingUpgradeMode { UnmonitoredAuto = "UnmonitoredAuto" } +// @public +export enum KnownRuntimeFailureAction { + Manual = "Manual", + Rollback = "Rollback" +} + +// @public +export enum KnownRuntimeRollingUpgradeMode { + Monitored = "Monitored", + UnmonitoredAuto = "UnmonitoredAuto", + UnmonitoredManual = "UnmonitoredManual" +} + +// @public +export enum KnownRuntimeUpgradeKind { + Rolling = "Rolling" +} + // @public export enum KnownSecurityEncryptionType { DiskWithVMGuestState = "DiskWithVMGuestState", @@ -735,8 +769,8 @@ export enum KnownUpdateType { // @public export enum KnownVersions { V20241101Preview = "2024-11-01-preview", - // (undocumented) - V20250301Preview = "2025-03-01-preview" + V20250301Preview = "2025-03-01-preview", + V20250601Preview = "2025-06-01-preview" } // @public @@ -843,6 +877,7 @@ export interface ManagedClusterProperties { enableAutoOSUpgrade?: boolean; enableHttpGatewayExclusiveAuthMode?: boolean; enableIpv6?: boolean; + enableOutboundOnlyNodeTypes?: boolean; enableServicePublicIP?: boolean; fabricSettings?: SettingsSectionDescription[]; readonly fqdn?: string; @@ -1101,6 +1136,7 @@ export interface NodeTypeProperties { evictionPolicy?: EvictionPolicyType; frontendConfigurations?: FrontendConfiguration[]; hostGroupId?: string; + isOutboundOnly?: boolean; isPrimary: boolean; isSpotVM?: boolean; isStateless?: boolean; @@ -1401,11 +1437,57 @@ export interface RollingUpgradeMonitoringPolicy { upgradeTimeout: string; } +// @public +export interface RuntimeApplicationHealthPolicy { + considerWarningAsError: boolean; + defaultServiceTypeHealthPolicy?: RuntimeServiceTypeHealthPolicy; + maxPercentUnhealthyDeployedApplications: number; + serviceTypeHealthPolicyMap?: Record; +} + +// @public +export type RuntimeFailureAction = string; + // @public export interface RuntimeResumeApplicationUpgradeParameters { upgradeDomainName?: string; } +// @public +export type RuntimeRollingUpgradeMode = string; + +// @public +export interface RuntimeRollingUpgradeUpdateMonitoringPolicy { + failureAction?: RuntimeFailureAction; + forceRestart?: boolean; + healthCheckRetryTimeoutInMilliseconds?: string; + healthCheckStableDurationInMilliseconds?: string; + healthCheckWaitDurationInMilliseconds?: string; + instanceCloseDelayDurationInSeconds?: number; + replicaSetCheckTimeoutInMilliseconds?: number; + rollingUpgradeMode: RuntimeRollingUpgradeMode; + upgradeDomainTimeoutInMilliseconds?: string; + upgradeTimeoutInMilliseconds?: string; +} + +// @public +export interface RuntimeServiceTypeHealthPolicy { + maxPercentUnhealthyPartitionsPerService: number; + maxPercentUnhealthyReplicasPerPartition: number; + maxPercentUnhealthyServices: number; +} + +// @public +export interface RuntimeUpdateApplicationUpgradeParameters { + applicationHealthPolicy?: RuntimeApplicationHealthPolicy; + name: string; + updateDescription?: RuntimeRollingUpgradeUpdateMonitoringPolicy; + upgradeKind: RuntimeUpgradeKind; +} + +// @public +export type RuntimeUpgradeKind = string; + // @public export interface ScalingMechanism { // (undocumented) @@ -1448,6 +1530,7 @@ export type ServiceCorrelationScheme = string; // @public export interface ServiceEndpoint { locations?: string[]; + networkIdentifier?: string; service: string; } @@ -1475,6 +1558,7 @@ export class ServiceFabricManagedClustersManagementClient { // @public export interface ServiceFabricManagedClustersManagementClientOptionalParams extends ClientOptions { apiVersion?: string; + cloudSetting?: AzureSupportedClouds; } // @public diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts index c0643b19441f..dce54f3d3753 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a Service Fabric managed application type version resource with the specified name. * * @summary create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function putAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts index f1b6d16cecd2..ecf8732aeb45 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete a Service Fabric managed application type version resource with the specified name. * * @summary delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts index bc29355605ba..cd80b1af5d8f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. * * @summary get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts index 52b54783f1c7..093753fc03ee 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsListByApplicationTypesSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. * * @summary gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAListOfApplicationTypeVersionResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts index c1c1fda5621b..5bcce3be187b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypeVersionsUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to updates the tags of an application type version resource of a given managed cluster. * * @summary updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function patchAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts index de4671e55f60..d5535820b50f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a Service Fabric managed application type name resource with the specified name. * * @summary create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function putAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts index a87bfcd93be0..c260ac960055 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete a Service Fabric managed application type name resource with the specified name. * * @summary delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts index 425d843a770b..585bbdcd0ff6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. * * @summary get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts index 02d7c19cc2dc..2865028b41ad 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. * * @summary gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAListOfApplicationTypeNameResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts index c19a61c14538..746d5f963751 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationTypesUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to updates the tags of an application type resource of a given managed cluster. * * @summary updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function patchAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts index cf33496321e2..37078c7b679b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a Service Fabric managed application resource with the specified name. * * @summary create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function putAnApplicationWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -62,7 +61,7 @@ async function putAnApplicationWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric managed application resource with the specified name. * * @summary create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json */ async function putAnApplicationWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts index 01794f49a854..cd2de7568af2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete a Service Fabric managed application resource with the specified name. * * @summary delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteAnApplication(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts index 43e05bea0bed..1c55cd60f5bc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. * * @summary get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAnApplication(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts index 4467bb2376cc..306feeb2338c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. * * @summary gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAListOfApplicationResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts index caef22b5a228..7f22af71a858 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsReadUpgradeSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. * * @summary get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAnApplicationUpgrade(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts index 4333eef1bea3..ceb0c36d6ff5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsResumeUpgradeSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. * * @summary send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function resumeUpgrade(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts index d73032c812b1..09ba2f225106 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsStartRollbackSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. * * @summary send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function startAnApplicationUpgradeRollback(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts index 020994ce9961..a9f4f0fca701 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to updates the tags of an application resource of a given managed cluster. * * @summary updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function patchAnApplication(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateUpgradeSample.ts new file mode 100644 index 000000000000..3ebd11df2ea3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/applicationsUpdateUpgradeSample.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to send a request to update the current application upgrade. + * + * @summary send a request to update the current application upgrade. + * x-ms-original-file: 2025-06-01-preview/ApplicationActionUpdateUpgrade_example.json + */ +async function updateAnApplicationUpgrade(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + await client.applications.updateUpgrade("resRg", "myCluster", "myApp", { + upgradeKind: "Rolling", + name: "fabric:/Voting", + updateDescription: { + rollingUpgradeMode: "Monitored", + forceRestart: true, + failureAction: "Manual", + healthCheckWaitDurationInMilliseconds: "PT0H0M10S", + healthCheckStableDurationInMilliseconds: "PT1H0M0S", + healthCheckRetryTimeoutInMilliseconds: "PT0H15M0S", + upgradeTimeoutInMilliseconds: "PT2H0M0S", + upgradeDomainTimeoutInMilliseconds: "PT2H0M0S", + }, + applicationHealthPolicy: { + considerWarningAsError: true, + maxPercentUnhealthyDeployedApplications: 10, + defaultServiceTypeHealthPolicy: { + maxPercentUnhealthyPartitionsPerService: 10, + maxPercentUnhealthyReplicasPerPartition: 11, + maxPercentUnhealthyServices: 12, + }, + serviceTypeHealthPolicyMap: { + VotingWeb: { + maxPercentUnhealthyPartitionsPerService: 13, + maxPercentUnhealthyReplicasPerPartition: 14, + maxPercentUnhealthyServices: 15, + }, + }, + }, + }); +} + +async function main(): Promise { + await updateAnApplicationUpgrade(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts index c393c42255db..c4065d01669f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedApplyMaintenanceWindowPostSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. * * @summary action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function applyMaintenanceWindowStatus(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts index c867ea0607d7..b4441847e8af 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedAzResiliencyStatusGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * * @summary action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function azResiliencyStatusOfBaseResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts index 2f4cf93458ff..0a9929011413 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetByEnvironmentSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets information about an available Service Fabric cluster code version by environment. * * @summary gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getClusterVersionByEnvironment(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts index c47da04f8f7e..88bb3902f418 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets information about an available Service Fabric managed cluster code version. * * @summary gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getClusterVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts index 0b91b513cf40..48396fdba4a4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListByEnvironmentSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all available code versions for Service Fabric cluster resources by environment. * * @summary gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listClusterVersionsByEnvironment(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts index 2d60bcf164ed..ebbfc9777b8b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClusterVersionListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all available code versions for Service Fabric cluster resources by location. * * @summary gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listClusterVersions(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts index 3fffed0f9316..be467332e9e6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a Service Fabric managed cluster resource with the specified name. * * @summary create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function putAClusterWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -106,7 +105,14 @@ async function putAClusterWithMaximumParameters(): Promise { "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", publicIPv6PrefixId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", - serviceEndpoints: [{ locations: ["eastus2", "usnorth"], service: "Microsoft.Storage" }], + serviceEndpoints: [ + { + locations: ["eastus2", "usnorth"], + service: "Microsoft.Storage", + networkIdentifier: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/publicIPAddresses/myPublicIP", + }, + ], upgradeDescription: { deltaHealthPolicy: { maxPercentDeltaUnhealthyApplications: 40, @@ -129,6 +135,7 @@ async function putAClusterWithMaximumParameters(): Promise { useCustomVnet: true, zonalResiliency: true, zonalUpdateMode: "Fast", + enableOutboundOnlyNodeTypes: true, }, sku: { name: "Basic" }, tags: {}, @@ -140,7 +147,7 @@ async function putAClusterWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric managed cluster resource with the specified name. * * @summary create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json */ async function putAClusterWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts index 6ed507379dde..e51d7a316dc3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete a Service Fabric managed cluster resource with the specified name. * * @summary delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteACluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetFaultSimulationSample.ts new file mode 100644 index 000000000000..dc1ca67a23c0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets a fault simulation by the simulationId. + * + * @summary gets a fault simulation by the simulationId. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + */ +async function getManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.getFaultSimulation("resRg", "myCluster", { + simulationId: "aec13cc2-1d39-4ba6-a1a8-2fc35b00643c", + }); + console.log(result); +} + +async function main(): Promise { + await getManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts index 67a531356fb1..b3a74335aaca 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. * * @summary get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getACluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts index 9ed1fc1ed8d7..55e48e2ae72e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListByResourceGroupSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @summary gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listClusterByResourceGroup(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts index 21dba6463f3c..0ba9ad7454c3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListBySubscriptionSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @summary gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listManagedClusters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListFaultSimulationSample.ts new file mode 100644 index 000000000000..e6412b291425 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersListFaultSimulationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of recent fault simulations for the cluster. + * + * @summary gets the list of recent fault simulations for the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + */ +async function listManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.managedClusters.listFaultSimulation("resRg", "myCluster")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersStartFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersStartFaultSimulationSample.ts new file mode 100644 index 000000000000..ea603ff23025 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersStartFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to starts a fault simulation on the cluster. + * + * @summary starts a fault simulation on the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + */ +async function startManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.startFaultSimulation("resRg", "myCluster", { + parameters: { faultKind: "Zone", zones: ["2"] }, + }); + console.log(result); +} + +async function main(): Promise { + await startManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersStopFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersStopFaultSimulationSample.ts new file mode 100644 index 000000000000..c9e9ca452e39 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersStopFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to stops a fault simulation on the cluster. + * + * @summary stops a fault simulation on the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + */ +async function stopManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.stopFaultSimulation("resRg", "myCluster", { + simulationId: "1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3", + }); + console.log(result); +} + +async function main(): Promise { + await stopManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts index a7d7b1ec4393..ad86efe2b362 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedClustersUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to update the tags of of a Service Fabric managed cluster resource with the specified name. * * @summary update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function patchAManagedCluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts index 27bf465b53f5..4882382c0755 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedMaintenanceWindowStatusGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to action to get Maintenance Window Status of the Service Fabric Managed Clusters. * * @summary action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getMaintenanceWindowStatus(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts index 3b265b2b0f1d..5f27af9cebac 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get unsupported vm size for Service Fabric Managed Clusters. * * @summary get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getUnsupportedVmSizes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts index 07e665206e2f..e016a97fb948 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/managedUnsupportedVMSizesListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @summary get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listUnsupportedVmSizes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts index 3bbdcd94f9f6..0bf45321aa9d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypeSkusListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric node type supported SKUs. * * @summary get a Service Fabric node type supported SKUs. - * x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listANodeTypeSKUs(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts index 4f44d3aabbbd..4542bd6ab4b1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function putANodeTypeWithAutoScaleParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -75,7 +74,7 @@ async function putANodeTypeWithAutoScaleParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json */ async function putNodeTypeWithCustomVmImage(): Promise { const credential = new DefaultAzureCredential(); @@ -98,7 +97,7 @@ async function putNodeTypeWithCustomVmImage(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ async function putNodeTypeWithSharedGalleriesCustomVmImage(): Promise { const credential = new DefaultAzureCredential(); @@ -121,7 +120,7 @@ async function putNodeTypeWithSharedGalleriesCustomVmImage(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json */ async function putNodeTypeWithDedicatedHosts(): Promise { const credential = new DefaultAzureCredential(); @@ -152,7 +151,7 @@ async function putNodeTypeWithDedicatedHosts(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json */ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(): Promise { const credential = new DefaultAzureCredential(); @@ -192,7 +191,7 @@ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(): Promis * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json */ async function putNodeTypeWithVmImagePlan(): Promise { const credential = new DefaultAzureCredential(); @@ -222,7 +221,7 @@ async function putNodeTypeWithVmImagePlan(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json */ async function putANodeTypeWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); @@ -379,6 +378,7 @@ async function putANodeTypeWithMaximumParameters(): Promise { ], vmSetupActions: ["EnableContainers", "EnableHyperV"], vmSize: "Standard_DS3", + isOutboundOnly: true, }, }, ); @@ -389,7 +389,7 @@ async function putANodeTypeWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json */ async function putANodeTypeWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeallocateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeallocateSample.ts index f8ad79947604..20ff05ac9012 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeallocateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeallocateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. * * @summary deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. - * x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deallocateNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts index a908adae35b6..a1db97e748c2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteNodeSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. * * @summary deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts index cb5102e3c14a..2b39888e53a1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete a Service Fabric node type of a given managed cluster. * * @summary delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteANodeType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetFaultSimulationSample.ts new file mode 100644 index 000000000000..f72f3d9842d6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets a fault simulation by the simulationId. + * + * @summary gets a fault simulation by the simulationId. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + */ +async function getNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.getFaultSimulation("resRg", "myCluster", "BE", { + simulationId: "aec13cc2-1d39-4ba6-a1a8-2fc35b00643c", + }); + console.log(result); +} + +async function main(): Promise { + await getNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts index 2d977ed89446..6c37e7b8b5d4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric node type of a given managed cluster. * * @summary get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getANodeType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts index 18b308434b43..ee93264efa73 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListByManagedClustersSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all Node types of the specified managed cluster. * * @summary gets all Node types of the specified managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listNodeTypeOfTheSpecifiedManagedCluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListFaultSimulationSample.ts new file mode 100644 index 000000000000..ee71f122b3fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesListFaultSimulationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of recent fault simulations for the node type. + * + * @summary gets the list of recent fault simulations for the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + */ +async function listNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.nodeTypes.listFaultSimulation("resRg", "myCluster", "BE")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRedeploySample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRedeploySample.ts index eccce30b2b77..9deb119037ff 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRedeploySample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRedeploySample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. * * @summary redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. - * x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function redeployAllNodesByUpgradeDomain(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -24,7 +23,7 @@ async function redeployAllNodesByUpgradeDomain(): Promise { * This sample demonstrates how to redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. * * @summary redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. - * x-ms-original-file: 2025-03-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json */ async function redeployNodes(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts index 271fafbc84e8..cf83f377dbcb 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesReimageSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function reimageAllNodesByUpgradeDomain(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -24,7 +23,7 @@ async function reimageAllNodesByUpgradeDomain(): Promise { * This sample demonstrates how to reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json */ async function reimageNodes(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts index ca64b2e09dc5..32c32a53882e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesRestartSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. * * @summary restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function restartNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartFaultSimulationSample.ts new file mode 100644 index 000000000000..a5da885a944b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to starts a fault simulation on the node type. + * + * @summary starts a fault simulation on the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + */ +async function startNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.startFaultSimulation("resRg", "myCluster", "BE", { + parameters: { faultKind: "Zone", zones: ["2"] }, + }); + console.log(result); +} + +async function main(): Promise { + await startNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartSample.ts index cf00c56a8060..d9e3f48ade6f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStartSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. * * @summary starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. - * x-ms-original-file: 2025-03-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function startNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStopFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStopFaultSimulationSample.ts new file mode 100644 index 000000000000..68badac2b113 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesStopFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to stops a fault simulation on the node type. + * + * @summary stops a fault simulation on the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + */ +async function stopNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.stopFaultSimulation("resRg", "myCluster", "BE", { + simulationId: "1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3", + }); + console.log(result); +} + +async function main(): Promise { + await stopNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts index 44b9188d46c6..34f185cd770d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/nodeTypesUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to update the configuration of a node type of a given managed cluster, only updating tags. * * @summary update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function patchANodeTypeWhileAutoScaling(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -26,7 +25,7 @@ async function patchANodeTypeWhileAutoScaling(): Promise { * This sample demonstrates how to update the configuration of a node type of a given managed cluster, only updating tags. * * @summary update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json */ async function patchANodeType(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts index b815241d0628..0e594b031a5b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationResultsGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get long running operation result. * * @summary get long running operation result. - * x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json + * x-ms-original-file: 2025-06-01-preview/OperationResultsGet_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getLongRunningOperationResult(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts index 7770c7fc3aba..9d80521cc035 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationStatusGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get long running operation status. * * @summary get long running operation status. - * x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json + * x-ms-original-file: 2025-06-01-preview/OperationStatusFailed_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function errorResponseDescribingWhyTheOperationFailed(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -23,7 +22,7 @@ async function errorResponseDescribingWhyTheOperationFailed(): Promise { * This sample demonstrates how to get long running operation status. * * @summary get long running operation status. - * x-ms-original-file: 2025-03-01-preview/OperationStatusSucceeded_example.json + * x-ms-original-file: 2025-06-01-preview/OperationStatusSucceeded_example.json */ async function okTheRequestHasSucceeded(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts index 239a12068812..f922e290c38f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/operationsListSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get the list of available Service Fabric resource provider API operations. * * @summary get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: 2025-03-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function listTheOperationsForTheProvider(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts index bbffa2a9d690..82bf9d1b23d0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesCreateOrUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to create or update a Service Fabric managed service resource with the specified name. * * @summary create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function putAServiceWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; @@ -64,7 +63,7 @@ async function putAServiceWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric managed service resource with the specified name. * * @summary create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json */ async function putAServiceWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts index ba656b314168..05732ac32f0a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesDeleteSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to delete a Service Fabric managed service resource with the specified name. * * @summary delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function deleteAService(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts index 3e573f2d0d58..309183ce99e4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesGetSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. * * @summary get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAService(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts index cf58a8f9b8a2..dc4e2a5f3a32 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesListByApplicationsSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to gets all service resources created or in the process of being created in the Service Fabric managed application resource. * * @summary gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function getAListOfServiceResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts index a8526a7c7c97..11a54298f039 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples-dev/servicesUpdateSample.ts @@ -1,16 +1,15 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + /** * This sample demonstrates how to updates the tags of a service resource of a given managed cluster. * * @summary updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json */ - -import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; -import { DefaultAzureCredential } from "@azure/identity"; - async function patchAService(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md index 6790fe21a42e..39d0fab2ee9a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/README.md @@ -4,59 +4,68 @@ These sample programs show how to use the JavaScript client libraries for @azure | **File Name** | **Description** | | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [applicationTypeVersionsCreateOrUpdateSample.js][applicationtypeversionscreateorupdatesample] | create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json | -| [applicationTypeVersionsDeleteSample.js][applicationtypeversionsdeletesample] | delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json | -| [applicationTypeVersionsGetSample.js][applicationtypeversionsgetsample] | get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json | -| [applicationTypeVersionsListByApplicationTypesSample.js][applicationtypeversionslistbyapplicationtypessample] | gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json | -| [applicationTypeVersionsUpdateSample.js][applicationtypeversionsupdatesample] | updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json | -| [applicationTypesCreateOrUpdateSample.js][applicationtypescreateorupdatesample] | create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json | -| [applicationTypesDeleteSample.js][applicationtypesdeletesample] | delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json | -| [applicationTypesGetSample.js][applicationtypesgetsample] | get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json | -| [applicationTypesListSample.js][applicationtypeslistsample] | gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json | -| [applicationTypesUpdateSample.js][applicationtypesupdatesample] | updates the tags of an application type resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json | -| [applicationsCreateOrUpdateSample.js][applicationscreateorupdatesample] | create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json | -| [applicationsDeleteSample.js][applicationsdeletesample] | delete a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json | -| [applicationsGetSample.js][applicationsgetsample] | get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json | -| [applicationsListSample.js][applicationslistsample] | gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json | -| [applicationsReadUpgradeSample.js][applicationsreadupgradesample] | get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json | -| [applicationsResumeUpgradeSample.js][applicationsresumeupgradesample] | send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json | -| [applicationsStartRollbackSample.js][applicationsstartrollbacksample] | send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json | -| [applicationsUpdateSample.js][applicationsupdatesample] | updates the tags of an application resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json | -| [managedApplyMaintenanceWindowPostSample.js][managedapplymaintenancewindowpostsample] | action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json | -| [managedAzResiliencyStatusGetSample.js][managedazresiliencystatusgetsample] | action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json | -| [managedClusterVersionGetByEnvironmentSample.js][managedclusterversiongetbyenvironmentsample] | gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json | -| [managedClusterVersionGetSample.js][managedclusterversiongetsample] | gets information about an available Service Fabric managed cluster code version. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json | -| [managedClusterVersionListByEnvironmentSample.js][managedclusterversionlistbyenvironmentsample] | gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json | -| [managedClusterVersionListSample.js][managedclusterversionlistsample] | gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json | -| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json | -| [managedClustersDeleteSample.js][managedclustersdeletesample] | delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json | -| [managedClustersGetSample.js][managedclustersgetsample] | get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json | -| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json | -| [managedClustersListBySubscriptionSample.js][managedclusterslistbysubscriptionsample] | gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json | -| [managedClustersUpdateSample.js][managedclustersupdatesample] | update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json | -| [managedMaintenanceWindowStatusGetSample.js][managedmaintenancewindowstatusgetsample] | action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json | -| [managedUnsupportedVMSizesGetSample.js][managedunsupportedvmsizesgetsample] | get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json | -| [managedUnsupportedVMSizesListSample.js][managedunsupportedvmsizeslistsample] | get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json | -| [nodeTypeSkusListSample.js][nodetypeskuslistsample] | get a Service Fabric node type supported SKUs. x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json | -| [nodeTypesCreateOrUpdateSample.js][nodetypescreateorupdatesample] | create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json | -| [nodeTypesDeallocateSample.js][nodetypesdeallocatesample] | deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json | -| [nodeTypesDeleteNodeSample.js][nodetypesdeletenodesample] | deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json | -| [nodeTypesDeleteSample.js][nodetypesdeletesample] | delete a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json | -| [nodeTypesGetSample.js][nodetypesgetsample] | get a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json | -| [nodeTypesListByManagedClustersSample.js][nodetypeslistbymanagedclusterssample] | gets all Node types of the specified managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json | -| [nodeTypesRedeploySample.js][nodetypesredeploysample] | redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json | -| [nodeTypesReimageSample.js][nodetypesreimagesample] | reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json | -| [nodeTypesRestartSample.js][nodetypesrestartsample] | restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json | -| [nodeTypesStartSample.js][nodetypesstartsample] | starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. x-ms-original-file: 2025-03-01-preview/StartNodes_example.json | -| [nodeTypesUpdateSample.js][nodetypesupdatesample] | update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json | -| [operationResultsGetSample.js][operationresultsgetsample] | get long running operation result. x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json | -| [operationStatusGetSample.js][operationstatusgetsample] | get long running operation status. x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json | -| [operationsListSample.js][operationslistsample] | get the list of available Service Fabric resource provider API operations. x-ms-original-file: 2025-03-01-preview/OperationsList_example.json | -| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json | -| [servicesDeleteSample.js][servicesdeletesample] | delete a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json | -| [servicesGetSample.js][servicesgetsample] | get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json | -| [servicesListByApplicationsSample.js][serviceslistbyapplicationssample] | gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json | -| [servicesUpdateSample.js][servicesupdatesample] | updates the tags of a service resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json | +| [applicationTypeVersionsCreateOrUpdateSample.js][applicationtypeversionscreateorupdatesample] | create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json | +| [applicationTypeVersionsDeleteSample.js][applicationtypeversionsdeletesample] | delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json | +| [applicationTypeVersionsGetSample.js][applicationtypeversionsgetsample] | get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json | +| [applicationTypeVersionsListByApplicationTypesSample.js][applicationtypeversionslistbyapplicationtypessample] | gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json | +| [applicationTypeVersionsUpdateSample.js][applicationtypeversionsupdatesample] | updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json | +| [applicationTypesCreateOrUpdateSample.js][applicationtypescreateorupdatesample] | create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json | +| [applicationTypesDeleteSample.js][applicationtypesdeletesample] | delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json | +| [applicationTypesGetSample.js][applicationtypesgetsample] | get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json | +| [applicationTypesListSample.js][applicationtypeslistsample] | gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json | +| [applicationTypesUpdateSample.js][applicationtypesupdatesample] | updates the tags of an application type resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json | +| [applicationsCreateOrUpdateSample.js][applicationscreateorupdatesample] | create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json | +| [applicationsDeleteSample.js][applicationsdeletesample] | delete a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json | +| [applicationsGetSample.js][applicationsgetsample] | get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json | +| [applicationsListSample.js][applicationslistsample] | gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json | +| [applicationsReadUpgradeSample.js][applicationsreadupgradesample] | get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json | +| [applicationsResumeUpgradeSample.js][applicationsresumeupgradesample] | send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json | +| [applicationsStartRollbackSample.js][applicationsstartrollbacksample] | send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json | +| [applicationsUpdateSample.js][applicationsupdatesample] | updates the tags of an application resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json | +| [applicationsUpdateUpgradeSample.js][applicationsupdateupgradesample] | send a request to update the current application upgrade. x-ms-original-file: 2025-06-01-preview/ApplicationActionUpdateUpgrade_example.json | +| [managedApplyMaintenanceWindowPostSample.js][managedapplymaintenancewindowpostsample] | action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json | +| [managedAzResiliencyStatusGetSample.js][managedazresiliencystatusgetsample] | action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json | +| [managedClusterVersionGetByEnvironmentSample.js][managedclusterversiongetbyenvironmentsample] | gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json | +| [managedClusterVersionGetSample.js][managedclusterversiongetsample] | gets information about an available Service Fabric managed cluster code version. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json | +| [managedClusterVersionListByEnvironmentSample.js][managedclusterversionlistbyenvironmentsample] | gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json | +| [managedClusterVersionListSample.js][managedclusterversionlistsample] | gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json | +| [managedClustersCreateOrUpdateSample.js][managedclusterscreateorupdatesample] | create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json | +| [managedClustersDeleteSample.js][managedclustersdeletesample] | delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json | +| [managedClustersGetFaultSimulationSample.js][managedclustersgetfaultsimulationsample] | gets a fault simulation by the simulationId. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json | +| [managedClustersGetSample.js][managedclustersgetsample] | get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json | +| [managedClustersListByResourceGroupSample.js][managedclusterslistbyresourcegroupsample] | gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json | +| [managedClustersListBySubscriptionSample.js][managedclusterslistbysubscriptionsample] | gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json | +| [managedClustersListFaultSimulationSample.js][managedclusterslistfaultsimulationsample] | gets the list of recent fault simulations for the cluster. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json | +| [managedClustersStartFaultSimulationSample.js][managedclustersstartfaultsimulationsample] | starts a fault simulation on the cluster. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json | +| [managedClustersStopFaultSimulationSample.js][managedclustersstopfaultsimulationsample] | stops a fault simulation on the cluster. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json | +| [managedClustersUpdateSample.js][managedclustersupdatesample] | update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json | +| [managedMaintenanceWindowStatusGetSample.js][managedmaintenancewindowstatusgetsample] | action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json | +| [managedUnsupportedVMSizesGetSample.js][managedunsupportedvmsizesgetsample] | get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json | +| [managedUnsupportedVMSizesListSample.js][managedunsupportedvmsizeslistsample] | get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json | +| [nodeTypeSkusListSample.js][nodetypeskuslistsample] | get a Service Fabric node type supported SKUs. x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json | +| [nodeTypesCreateOrUpdateSample.js][nodetypescreateorupdatesample] | create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json | +| [nodeTypesDeallocateSample.js][nodetypesdeallocatesample] | deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json | +| [nodeTypesDeleteNodeSample.js][nodetypesdeletenodesample] | deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json | +| [nodeTypesDeleteSample.js][nodetypesdeletesample] | delete a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json | +| [nodeTypesGetFaultSimulationSample.js][nodetypesgetfaultsimulationsample] | gets a fault simulation by the simulationId. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json | +| [nodeTypesGetSample.js][nodetypesgetsample] | get a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json | +| [nodeTypesListByManagedClustersSample.js][nodetypeslistbymanagedclusterssample] | gets all Node types of the specified managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json | +| [nodeTypesListFaultSimulationSample.js][nodetypeslistfaultsimulationsample] | gets the list of recent fault simulations for the node type. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json | +| [nodeTypesRedeploySample.js][nodetypesredeploysample] | redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json | +| [nodeTypesReimageSample.js][nodetypesreimagesample] | reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json | +| [nodeTypesRestartSample.js][nodetypesrestartsample] | restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json | +| [nodeTypesStartFaultSimulationSample.js][nodetypesstartfaultsimulationsample] | starts a fault simulation on the node type. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json | +| [nodeTypesStartSample.js][nodetypesstartsample] | starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. x-ms-original-file: 2025-06-01-preview/StartNodes_example.json | +| [nodeTypesStopFaultSimulationSample.js][nodetypesstopfaultsimulationsample] | stops a fault simulation on the node type. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json | +| [nodeTypesUpdateSample.js][nodetypesupdatesample] | update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json | +| [operationResultsGetSample.js][operationresultsgetsample] | get long running operation result. x-ms-original-file: 2025-06-01-preview/OperationResultsGet_example.json | +| [operationStatusGetSample.js][operationstatusgetsample] | get long running operation status. x-ms-original-file: 2025-06-01-preview/OperationStatusFailed_example.json | +| [operationsListSample.js][operationslistsample] | get the list of available Service Fabric resource provider API operations. x-ms-original-file: 2025-06-01-preview/OperationsList_example.json | +| [servicesCreateOrUpdateSample.js][servicescreateorupdatesample] | create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json | +| [servicesDeleteSample.js][servicesdeletesample] | delete a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json | +| [servicesGetSample.js][servicesgetsample] | get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json | +| [servicesListByApplicationsSample.js][serviceslistbyapplicationssample] | gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json | +| [servicesUpdateSample.js][servicesupdatesample] | updates the tags of a service resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json | ## Prerequisites @@ -114,6 +123,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [applicationsresumeupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js [applicationsstartrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js [applicationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js +[applicationsupdateupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateUpgradeSample.js [managedapplymaintenancewindowpostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js [managedazresiliencystatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js [managedclusterversiongetbyenvironmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js @@ -122,9 +132,13 @@ Take a look at our [API Documentation][apiref] for more information about the AP [managedclusterversionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js [managedclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js [managedclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js +[managedclustersgetfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetFaultSimulationSample.js [managedclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js [managedclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js [managedclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js +[managedclusterslistfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListFaultSimulationSample.js +[managedclustersstartfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStartFaultSimulationSample.js +[managedclustersstopfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStopFaultSimulationSample.js [managedclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js [managedmaintenancewindowstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js [managedunsupportedvmsizesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js @@ -134,12 +148,16 @@ Take a look at our [API Documentation][apiref] for more information about the AP [nodetypesdeallocatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeallocateSample.js [nodetypesdeletenodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js [nodetypesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js +[nodetypesgetfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetFaultSimulationSample.js [nodetypesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js [nodetypeslistbymanagedclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js +[nodetypeslistfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListFaultSimulationSample.js [nodetypesredeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRedeploySample.js [nodetypesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js [nodetypesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js +[nodetypesstartfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartFaultSimulationSample.js [nodetypesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartSample.js +[nodetypesstopfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStopFaultSimulationSample.js [nodetypesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js [operationresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js [operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js index b5df7f249b58..361ea1b8516c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsCreateOrUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a Service Fabric managed application type version resource with the specified name. * * @summary create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json */ async function putAnApplicationTypeVersion() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js index 7c09de7f2c7e..998209cbe935 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsDeleteSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a Service Fabric managed application type version resource with the specified name. * * @summary delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ async function deleteAnApplicationTypeVersion() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js index 4c6e328457f4..fd369a038d42 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. * * @summary get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json */ async function getAnApplicationTypeVersion() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js index 1a3b31039e74..bb8c8458ab2d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsListByApplicationTypesSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. * * @summary gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json */ async function getAListOfApplicationTypeVersionResources() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js index 735fb67ae132..f70aadc9f08e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypeVersionsUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to updates the tags of an application type version resource of a given managed cluster. * * @summary updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json */ async function patchAnApplicationTypeVersion() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js index 0b142b0dfec4..95ab55f81357 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesCreateOrUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a Service Fabric managed application type name resource with the specified name. * * @summary create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json */ async function putAnApplicationType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js index 517da561b654..e546327b4fc6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesDeleteSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a Service Fabric managed application type name resource with the specified name. * * @summary delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json */ async function deleteAnApplicationType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js index 7da24756d749..96a688ccd048 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. * * @summary get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json */ async function getAnApplicationType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js index f8c364b8a9f1..76f9cd120108 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesListSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. * * @summary gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json */ async function getAListOfApplicationTypeNameResources() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js index fa19bc09179c..869957f62ffe 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationTypesUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to updates the tags of an application type resource of a given managed cluster. * * @summary updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json */ async function patchAnApplicationType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js index c10c5395fa49..805b27f8b637 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsCreateOrUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a Service Fabric managed application resource with the specified name. * * @summary create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json */ async function putAnApplicationWithMaximumParameters() { const credential = new DefaultAzureCredential(); @@ -63,7 +63,7 @@ async function putAnApplicationWithMaximumParameters() { * This sample demonstrates how to create or update a Service Fabric managed application resource with the specified name. * * @summary create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json */ async function putAnApplicationWithMinimumParameters() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js index 724216644468..7ccc6478f6ef 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsDeleteSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a Service Fabric managed application resource with the specified name. * * @summary delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json */ async function deleteAnApplication() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js index 8f68cecbd98f..649a6ddf06c6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. * * @summary get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json */ async function getAnApplication() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js index d7a1ef864120..2a8f3365eec8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsListSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. * * @summary gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json */ async function getAListOfApplicationResources() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js index e4133788676f..b03881c9ffad 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsReadUpgradeSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. * * @summary get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json */ async function getAnApplicationUpgrade() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js index baa9b43ddf25..4711b8e16809 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsResumeUpgradeSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. * * @summary send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json */ async function resumeUpgrade() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js index 18340e3ce35d..b976ee93c0eb 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsStartRollbackSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. * * @summary send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json */ async function startAnApplicationUpgradeRollback() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js index 9380f3385de5..eaea726816ab 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to updates the tags of an application resource of a given managed cluster. * * @summary updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json */ async function patchAnApplication() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateUpgradeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateUpgradeSample.js new file mode 100644 index 000000000000..a483243cff2b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/applicationsUpdateUpgradeSample.js @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to send a request to update the current application upgrade. + * + * @summary send a request to update the current application upgrade. + * x-ms-original-file: 2025-06-01-preview/ApplicationActionUpdateUpgrade_example.json + */ +async function updateAnApplicationUpgrade() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + await client.applications.updateUpgrade("resRg", "myCluster", "myApp", { + upgradeKind: "Rolling", + name: "fabric:/Voting", + updateDescription: { + rollingUpgradeMode: "Monitored", + forceRestart: true, + failureAction: "Manual", + healthCheckWaitDurationInMilliseconds: "PT0H0M10S", + healthCheckStableDurationInMilliseconds: "PT1H0M0S", + healthCheckRetryTimeoutInMilliseconds: "PT0H15M0S", + upgradeTimeoutInMilliseconds: "PT2H0M0S", + upgradeDomainTimeoutInMilliseconds: "PT2H0M0S", + }, + applicationHealthPolicy: { + considerWarningAsError: true, + maxPercentUnhealthyDeployedApplications: 10, + defaultServiceTypeHealthPolicy: { + maxPercentUnhealthyPartitionsPerService: 10, + maxPercentUnhealthyReplicasPerPartition: 11, + maxPercentUnhealthyServices: 12, + }, + serviceTypeHealthPolicyMap: { + VotingWeb: { + maxPercentUnhealthyPartitionsPerService: 13, + maxPercentUnhealthyReplicasPerPartition: 14, + maxPercentUnhealthyServices: 15, + }, + }, + }, + }); +} + +async function main() { + await updateAnApplicationUpgrade(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js index edaa7359a6f3..96dcf54f5b07 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedApplyMaintenanceWindowPostSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. * * @summary action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ async function applyMaintenanceWindowStatus() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js index ca5629df3432..d86f9f9e98ba 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedAzResiliencyStatusGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * * @summary action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json */ async function azResiliencyStatusOfBaseResources() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js index ba8277d9e906..9d68e2445d8e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetByEnvironmentSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets information about an available Service Fabric cluster code version by environment. * * @summary gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ async function getClusterVersionByEnvironment() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js index 58d29ba07a46..c6f5fa46b21c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets information about an available Service Fabric managed cluster code version. * * @summary gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json */ async function getClusterVersion() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js index aa32dd59919a..a82ec3f4622b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListByEnvironmentSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all available code versions for Service Fabric cluster resources by environment. * * @summary gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json */ async function listClusterVersionsByEnvironment() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js index 533f59fd4af8..d470c18d223f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClusterVersionListSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all available code versions for Service Fabric cluster resources by location. * * @summary gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json */ async function listClusterVersions() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js index 45ab2d7166cd..3b5a9c94001e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersCreateOrUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a Service Fabric managed cluster resource with the specified name. * * @summary create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json */ async function putAClusterWithMaximumParameters() { const credential = new DefaultAzureCredential(); @@ -107,7 +107,14 @@ async function putAClusterWithMaximumParameters() { "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", publicIPv6PrefixId: "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", - serviceEndpoints: [{ locations: ["eastus2", "usnorth"], service: "Microsoft.Storage" }], + serviceEndpoints: [ + { + locations: ["eastus2", "usnorth"], + service: "Microsoft.Storage", + networkIdentifier: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/publicIPAddresses/myPublicIP", + }, + ], upgradeDescription: { deltaHealthPolicy: { maxPercentDeltaUnhealthyApplications: 40, @@ -130,6 +137,7 @@ async function putAClusterWithMaximumParameters() { useCustomVnet: true, zonalResiliency: true, zonalUpdateMode: "Fast", + enableOutboundOnlyNodeTypes: true, }, sku: { name: "Basic" }, tags: {}, @@ -141,7 +149,7 @@ async function putAClusterWithMaximumParameters() { * This sample demonstrates how to create or update a Service Fabric managed cluster resource with the specified name. * * @summary create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json */ async function putAClusterWithMinimumParameters() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js index ae0eaf32c0b6..e20c256ae1d1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersDeleteSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a Service Fabric managed cluster resource with the specified name. * * @summary delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json */ async function deleteACluster() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetFaultSimulationSample.js new file mode 100644 index 000000000000..56080c733af6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetFaultSimulationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets a fault simulation by the simulationId. + * + * @summary gets a fault simulation by the simulationId. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + */ +async function getManagedClusterFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.getFaultSimulation("resRg", "myCluster", { + simulationId: "aec13cc2-1d39-4ba6-a1a8-2fc35b00643c", + }); + console.log(result); +} + +async function main() { + await getManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js index 5e6a9a19776a..93d1b465ec85 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. * * @summary get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json */ async function getACluster() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js index 46c0a96677c9..74ddd2d09160 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListByResourceGroupSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @summary gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ async function listClusterByResourceGroup() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js index 6312d5aa2ec0..aded3109d84d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListBySubscriptionSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @summary gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ async function listManagedClusters() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListFaultSimulationSample.js new file mode 100644 index 000000000000..fe3316228004 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersListFaultSimulationSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of recent fault simulations for the cluster. + * + * @summary gets the list of recent fault simulations for the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + */ +async function listManagedClusterFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.managedClusters.listFaultSimulation("resRg", "myCluster")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStartFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStartFaultSimulationSample.js new file mode 100644 index 000000000000..6a93e8bdd2f2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStartFaultSimulationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to starts a fault simulation on the cluster. + * + * @summary starts a fault simulation on the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + */ +async function startManagedClusterFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.startFaultSimulation("resRg", "myCluster", { + parameters: { faultKind: "Zone", zones: ["2"] }, + }); + console.log(result); +} + +async function main() { + await startManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStopFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStopFaultSimulationSample.js new file mode 100644 index 000000000000..bf495fe44b6b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersStopFaultSimulationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to stops a fault simulation on the cluster. + * + * @summary stops a fault simulation on the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + */ +async function stopManagedClusterFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.stopFaultSimulation("resRg", "myCluster", { + simulationId: "1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3", + }); + console.log(result); +} + +async function main() { + await stopManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js index be5d93cc54f5..08172cbfdda2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedClustersUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to update the tags of of a Service Fabric managed cluster resource with the specified name. * * @summary update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json */ async function patchAManagedCluster() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js index d9c84348f924..421cbd97fa84 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedMaintenanceWindowStatusGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to action to get Maintenance Window Status of the Service Fabric Managed Clusters. * * @summary action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ async function getMaintenanceWindowStatus() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js index fd729f47df83..8c77321d147d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get unsupported vm size for Service Fabric Managed Clusters. * * @summary get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json */ async function getUnsupportedVmSizes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js index dbfe619355cd..5c235c656600 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/managedUnsupportedVMSizesListSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @summary get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json */ async function listUnsupportedVmSizes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js index 4cf041361196..bb7da4dd898a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypeSkusListSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric node type supported SKUs. * * @summary get a Service Fabric node type supported SKUs. - * x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json */ async function listANodeTypeSKUs() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js index 0ec8093a57bb..755755547033 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesCreateOrUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json */ async function putANodeTypeWithAutoScaleParameters() { const credential = new DefaultAzureCredential(); @@ -76,7 +76,7 @@ async function putANodeTypeWithAutoScaleParameters() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json */ async function putNodeTypeWithCustomVmImage() { const credential = new DefaultAzureCredential(); @@ -99,7 +99,7 @@ async function putNodeTypeWithCustomVmImage() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ async function putNodeTypeWithSharedGalleriesCustomVmImage() { const credential = new DefaultAzureCredential(); @@ -122,7 +122,7 @@ async function putNodeTypeWithSharedGalleriesCustomVmImage() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json */ async function putNodeTypeWithDedicatedHosts() { const credential = new DefaultAzureCredential(); @@ -153,7 +153,7 @@ async function putNodeTypeWithDedicatedHosts() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json */ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { const credential = new DefaultAzureCredential(); @@ -193,7 +193,7 @@ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json */ async function putNodeTypeWithVmImagePlan() { const credential = new DefaultAzureCredential(); @@ -223,7 +223,7 @@ async function putNodeTypeWithVmImagePlan() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json */ async function putANodeTypeWithMaximumParameters() { const credential = new DefaultAzureCredential(); @@ -380,6 +380,7 @@ async function putANodeTypeWithMaximumParameters() { ], vmSetupActions: ["EnableContainers", "EnableHyperV"], vmSize: "Standard_DS3", + isOutboundOnly: true, }, }, ); @@ -390,7 +391,7 @@ async function putANodeTypeWithMaximumParameters() { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json */ async function putANodeTypeWithMinimumParameters() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeallocateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeallocateSample.js index d59dabe3c630..417eed574201 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeallocateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeallocateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. * * @summary deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. - * x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json */ async function deallocateNodes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js index 3fe47c2082c2..2b666652ec98 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteNodeSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. * * @summary deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json */ async function deleteNodes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js index 0acd02f10436..0791f2cfb562 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesDeleteSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a Service Fabric node type of a given managed cluster. * * @summary delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json */ async function deleteANodeType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetFaultSimulationSample.js new file mode 100644 index 000000000000..ea6c5b397e89 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetFaultSimulationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets a fault simulation by the simulationId. + * + * @summary gets a fault simulation by the simulationId. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + */ +async function getNodeTypeFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.getFaultSimulation("resRg", "myCluster", "BE", { + simulationId: "aec13cc2-1d39-4ba6-a1a8-2fc35b00643c", + }); + console.log(result); +} + +async function main() { + await getNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js index 72a9085a6e2d..ee42a3a54b83 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric node type of a given managed cluster. * * @summary get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json */ async function getANodeType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js index a564473a2a2d..c28b79debf23 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListByManagedClustersSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all Node types of the specified managed cluster. * * @summary gets all Node types of the specified managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json */ async function listNodeTypeOfTheSpecifiedManagedCluster() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListFaultSimulationSample.js new file mode 100644 index 000000000000..85bb651626b6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesListFaultSimulationSample.js @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to gets the list of recent fault simulations for the node type. + * + * @summary gets the list of recent fault simulations for the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + */ +async function listNodeTypeFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.nodeTypes.listFaultSimulation("resRg", "myCluster", "BE")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main() { + await listNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRedeploySample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRedeploySample.js index a70c88ad39d7..383cfe8b5a6a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRedeploySample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRedeploySample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. * * @summary redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. - * x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json */ async function redeployAllNodesByUpgradeDomain() { const credential = new DefaultAzureCredential(); @@ -25,7 +25,7 @@ async function redeployAllNodesByUpgradeDomain() { * This sample demonstrates how to redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. * * @summary redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. - * x-ms-original-file: 2025-03-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json */ async function redeployNodes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js index f615aa88083d..d35a75f7aada 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesReimageSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json */ async function reimageAllNodesByUpgradeDomain() { const credential = new DefaultAzureCredential(); @@ -25,7 +25,7 @@ async function reimageAllNodesByUpgradeDomain() { * This sample demonstrates how to reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json */ async function reimageNodes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js index e5679e3a6ee6..21f88f552774 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesRestartSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. * * @summary restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json */ async function restartNodes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartFaultSimulationSample.js new file mode 100644 index 000000000000..2b3cd7fcd411 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartFaultSimulationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to starts a fault simulation on the node type. + * + * @summary starts a fault simulation on the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + */ +async function startNodeTypeFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.startFaultSimulation("resRg", "myCluster", "BE", { + parameters: { faultKind: "Zone", zones: ["2"] }, + }); + console.log(result); +} + +async function main() { + await startNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartSample.js index 93e213125b19..f4510ffb4a34 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStartSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. * * @summary starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. - * x-ms-original-file: 2025-03-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json */ async function startNodes() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStopFaultSimulationSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStopFaultSimulationSample.js new file mode 100644 index 000000000000..f0660173ccd9 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesStopFaultSimulationSample.js @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +const { + ServiceFabricManagedClustersManagementClient, +} = require("@azure/arm-servicefabricmanagedclusters"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to stops a fault simulation on the node type. + * + * @summary stops a fault simulation on the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + */ +async function stopNodeTypeFaultSimulation() { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.stopFaultSimulation("resRg", "myCluster", "BE", { + simulationId: "1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3", + }); + console.log(result); +} + +async function main() { + await stopNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js index a02849c25004..b6f2af250875 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/nodeTypesUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to update the configuration of a node type of a given managed cluster, only updating tags. * * @summary update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json */ async function patchANodeTypeWhileAutoScaling() { const credential = new DefaultAzureCredential(); @@ -27,7 +27,7 @@ async function patchANodeTypeWhileAutoScaling() { * This sample demonstrates how to update the configuration of a node type of a given managed cluster, only updating tags. * * @summary update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json */ async function patchANodeType() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js index a66581af8a2f..92217ebc7ea6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationResultsGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get long running operation result. * * @summary get long running operation result. - * x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json + * x-ms-original-file: 2025-06-01-preview/OperationResultsGet_example.json */ async function getLongRunningOperationResult() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js index a4d633c938e6..31cb79e454dc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationStatusGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get long running operation status. * * @summary get long running operation status. - * x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json + * x-ms-original-file: 2025-06-01-preview/OperationStatusFailed_example.json */ async function errorResponseDescribingWhyTheOperationFailed() { const credential = new DefaultAzureCredential(); @@ -24,7 +24,7 @@ async function errorResponseDescribingWhyTheOperationFailed() { * This sample demonstrates how to get long running operation status. * * @summary get long running operation status. - * x-ms-original-file: 2025-03-01-preview/OperationStatusSucceeded_example.json + * x-ms-original-file: 2025-06-01-preview/OperationStatusSucceeded_example.json */ async function okTheRequestHasSucceeded() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js index 919f0a91a044..74d46fe646b9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/operationsListSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get the list of available Service Fabric resource provider API operations. * * @summary get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: 2025-03-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json */ async function listTheOperationsForTheProvider() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json index 3dbc4a553d79..ca6d5b5ae71d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/package.json @@ -28,6 +28,6 @@ "dependencies": { "@azure/arm-servicefabricmanagedclusters": "next", "dotenv": "latest", - "@azure/identity": "^4.6.0" + "@azure/identity": "^4.9.0" } } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js index f44dfdf1ed65..9bbc64506fac 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesCreateOrUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to create or update a Service Fabric managed service resource with the specified name. * * @summary create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json */ async function putAServiceWithMaximumParameters() { const credential = new DefaultAzureCredential(); @@ -65,7 +65,7 @@ async function putAServiceWithMaximumParameters() { * This sample demonstrates how to create or update a Service Fabric managed service resource with the specified name. * * @summary create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json */ async function putAServiceWithMinimumParameters() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js index 1c95d1840ea8..700afbfc5a85 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesDeleteSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to delete a Service Fabric managed service resource with the specified name. * * @summary delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json */ async function deleteAService() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js index c749210cdadb..aad754ee2967 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesGetSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. * * @summary get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json */ async function getAService() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js index 3fcdf84f6be2..94c8e31c92c0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesListByApplicationsSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to gets all service resources created or in the process of being created in the Service Fabric managed application resource. * * @summary gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json */ async function getAListOfServiceResources() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js index 332b8cdf4ee0..da9253291b37 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/javascript/servicesUpdateSample.js @@ -10,7 +10,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to updates the tags of a service resource of a given managed cluster. * * @summary updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json */ async function patchAService() { const credential = new DefaultAzureCredential(); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md index 102ce2e7364d..c09ed6dfb51b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/README.md @@ -4,59 +4,68 @@ These sample programs show how to use the TypeScript client libraries for @azure | **File Name** | **Description** | | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [applicationTypeVersionsCreateOrUpdateSample.ts][applicationtypeversionscreateorupdatesample] | create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json | -| [applicationTypeVersionsDeleteSample.ts][applicationtypeversionsdeletesample] | delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json | -| [applicationTypeVersionsGetSample.ts][applicationtypeversionsgetsample] | get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json | -| [applicationTypeVersionsListByApplicationTypesSample.ts][applicationtypeversionslistbyapplicationtypessample] | gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json | -| [applicationTypeVersionsUpdateSample.ts][applicationtypeversionsupdatesample] | updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json | -| [applicationTypesCreateOrUpdateSample.ts][applicationtypescreateorupdatesample] | create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json | -| [applicationTypesDeleteSample.ts][applicationtypesdeletesample] | delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json | -| [applicationTypesGetSample.ts][applicationtypesgetsample] | get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json | -| [applicationTypesListSample.ts][applicationtypeslistsample] | gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json | -| [applicationTypesUpdateSample.ts][applicationtypesupdatesample] | updates the tags of an application type resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json | -| [applicationsCreateOrUpdateSample.ts][applicationscreateorupdatesample] | create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json | -| [applicationsDeleteSample.ts][applicationsdeletesample] | delete a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json | -| [applicationsGetSample.ts][applicationsgetsample] | get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json | -| [applicationsListSample.ts][applicationslistsample] | gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json | -| [applicationsReadUpgradeSample.ts][applicationsreadupgradesample] | get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json | -| [applicationsResumeUpgradeSample.ts][applicationsresumeupgradesample] | send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json | -| [applicationsStartRollbackSample.ts][applicationsstartrollbacksample] | send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json | -| [applicationsUpdateSample.ts][applicationsupdatesample] | updates the tags of an application resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json | -| [managedApplyMaintenanceWindowPostSample.ts][managedapplymaintenancewindowpostsample] | action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json | -| [managedAzResiliencyStatusGetSample.ts][managedazresiliencystatusgetsample] | action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json | -| [managedClusterVersionGetByEnvironmentSample.ts][managedclusterversiongetbyenvironmentsample] | gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json | -| [managedClusterVersionGetSample.ts][managedclusterversiongetsample] | gets information about an available Service Fabric managed cluster code version. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json | -| [managedClusterVersionListByEnvironmentSample.ts][managedclusterversionlistbyenvironmentsample] | gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json | -| [managedClusterVersionListSample.ts][managedclusterversionlistsample] | gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json | -| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json | -| [managedClustersDeleteSample.ts][managedclustersdeletesample] | delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json | -| [managedClustersGetSample.ts][managedclustersgetsample] | get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json | -| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json | -| [managedClustersListBySubscriptionSample.ts][managedclusterslistbysubscriptionsample] | gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json | -| [managedClustersUpdateSample.ts][managedclustersupdatesample] | update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json | -| [managedMaintenanceWindowStatusGetSample.ts][managedmaintenancewindowstatusgetsample] | action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json | -| [managedUnsupportedVMSizesGetSample.ts][managedunsupportedvmsizesgetsample] | get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json | -| [managedUnsupportedVMSizesListSample.ts][managedunsupportedvmsizeslistsample] | get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json | -| [nodeTypeSkusListSample.ts][nodetypeskuslistsample] | get a Service Fabric node type supported SKUs. x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json | -| [nodeTypesCreateOrUpdateSample.ts][nodetypescreateorupdatesample] | create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json | -| [nodeTypesDeallocateSample.ts][nodetypesdeallocatesample] | deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json | -| [nodeTypesDeleteNodeSample.ts][nodetypesdeletenodesample] | deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json | -| [nodeTypesDeleteSample.ts][nodetypesdeletesample] | delete a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json | -| [nodeTypesGetSample.ts][nodetypesgetsample] | get a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json | -| [nodeTypesListByManagedClustersSample.ts][nodetypeslistbymanagedclusterssample] | gets all Node types of the specified managed cluster. x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json | -| [nodeTypesRedeploySample.ts][nodetypesredeploysample] | redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json | -| [nodeTypesReimageSample.ts][nodetypesreimagesample] | reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json | -| [nodeTypesRestartSample.ts][nodetypesrestartsample] | restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json | -| [nodeTypesStartSample.ts][nodetypesstartsample] | starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. x-ms-original-file: 2025-03-01-preview/StartNodes_example.json | -| [nodeTypesUpdateSample.ts][nodetypesupdatesample] | update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json | -| [operationResultsGetSample.ts][operationresultsgetsample] | get long running operation result. x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json | -| [operationStatusGetSample.ts][operationstatusgetsample] | get long running operation status. x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json | -| [operationsListSample.ts][operationslistsample] | get the list of available Service Fabric resource provider API operations. x-ms-original-file: 2025-03-01-preview/OperationsList_example.json | -| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json | -| [servicesDeleteSample.ts][servicesdeletesample] | delete a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json | -| [servicesGetSample.ts][servicesgetsample] | get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json | -| [servicesListByApplicationsSample.ts][serviceslistbyapplicationssample] | gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json | -| [servicesUpdateSample.ts][servicesupdatesample] | updates the tags of a service resource of a given managed cluster. x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json | +| [applicationTypeVersionsCreateOrUpdateSample.ts][applicationtypeversionscreateorupdatesample] | create or update a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json | +| [applicationTypeVersionsDeleteSample.ts][applicationtypeversionsdeletesample] | delete a Service Fabric managed application type version resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json | +| [applicationTypeVersionsGetSample.ts][applicationtypeversionsgetsample] | get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json | +| [applicationTypeVersionsListByApplicationTypesSample.ts][applicationtypeversionslistbyapplicationtypessample] | gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json | +| [applicationTypeVersionsUpdateSample.ts][applicationtypeversionsupdatesample] | updates the tags of an application type version resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json | +| [applicationTypesCreateOrUpdateSample.ts][applicationtypescreateorupdatesample] | create or update a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json | +| [applicationTypesDeleteSample.ts][applicationtypesdeletesample] | delete a Service Fabric managed application type name resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json | +| [applicationTypesGetSample.ts][applicationtypesgetsample] | get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json | +| [applicationTypesListSample.ts][applicationtypeslistsample] | gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json | +| [applicationTypesUpdateSample.ts][applicationtypesupdatesample] | updates the tags of an application type resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json | +| [applicationsCreateOrUpdateSample.ts][applicationscreateorupdatesample] | create or update a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json | +| [applicationsDeleteSample.ts][applicationsdeletesample] | delete a Service Fabric managed application resource with the specified name. x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json | +| [applicationsGetSample.ts][applicationsgetsample] | get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json | +| [applicationsListSample.ts][applicationslistsample] | gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json | +| [applicationsReadUpgradeSample.ts][applicationsreadupgradesample] | get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json | +| [applicationsResumeUpgradeSample.ts][applicationsresumeupgradesample] | send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json | +| [applicationsStartRollbackSample.ts][applicationsstartrollbacksample] | send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json | +| [applicationsUpdateSample.ts][applicationsupdatesample] | updates the tags of an application resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json | +| [applicationsUpdateUpgradeSample.ts][applicationsupdateupgradesample] | send a request to update the current application upgrade. x-ms-original-file: 2025-06-01-preview/ApplicationActionUpdateUpgrade_example.json | +| [managedApplyMaintenanceWindowPostSample.ts][managedapplymaintenancewindowpostsample] | action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json | +| [managedAzResiliencyStatusGetSample.ts][managedazresiliencystatusgetsample] | action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json | +| [managedClusterVersionGetByEnvironmentSample.ts][managedclusterversiongetbyenvironmentsample] | gets information about an available Service Fabric cluster code version by environment. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json | +| [managedClusterVersionGetSample.ts][managedclusterversiongetsample] | gets information about an available Service Fabric managed cluster code version. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json | +| [managedClusterVersionListByEnvironmentSample.ts][managedclusterversionlistbyenvironmentsample] | gets all available code versions for Service Fabric cluster resources by environment. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json | +| [managedClusterVersionListSample.ts][managedclusterversionlistsample] | gets all available code versions for Service Fabric cluster resources by location. x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json | +| [managedClustersCreateOrUpdateSample.ts][managedclusterscreateorupdatesample] | create or update a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json | +| [managedClustersDeleteSample.ts][managedclustersdeletesample] | delete a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json | +| [managedClustersGetFaultSimulationSample.ts][managedclustersgetfaultsimulationsample] | gets a fault simulation by the simulationId. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json | +| [managedClustersGetSample.ts][managedclustersgetsample] | get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json | +| [managedClustersListByResourceGroupSample.ts][managedclusterslistbyresourcegroupsample] | gets all Service Fabric cluster resources created or in the process of being created in the resource group. x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json | +| [managedClustersListBySubscriptionSample.ts][managedclusterslistbysubscriptionsample] | gets all Service Fabric cluster resources created or in the process of being created in the subscription. x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json | +| [managedClustersListFaultSimulationSample.ts][managedclusterslistfaultsimulationsample] | gets the list of recent fault simulations for the cluster. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json | +| [managedClustersStartFaultSimulationSample.ts][managedclustersstartfaultsimulationsample] | starts a fault simulation on the cluster. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json | +| [managedClustersStopFaultSimulationSample.ts][managedclustersstopfaultsimulationsample] | stops a fault simulation on the cluster. x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json | +| [managedClustersUpdateSample.ts][managedclustersupdatesample] | update the tags of of a Service Fabric managed cluster resource with the specified name. x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json | +| [managedMaintenanceWindowStatusGetSample.ts][managedmaintenancewindowstatusgetsample] | action to get Maintenance Window Status of the Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json | +| [managedUnsupportedVMSizesGetSample.ts][managedunsupportedvmsizesgetsample] | get unsupported vm size for Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json | +| [managedUnsupportedVMSizesListSample.ts][managedunsupportedvmsizeslistsample] | get the lists of unsupported vm sizes for Service Fabric Managed Clusters. x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json | +| [nodeTypeSkusListSample.ts][nodetypeskuslistsample] | get a Service Fabric node type supported SKUs. x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json | +| [nodeTypesCreateOrUpdateSample.ts][nodetypescreateorupdatesample] | create or update a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json | +| [nodeTypesDeallocateSample.ts][nodetypesdeallocatesample] | deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json | +| [nodeTypesDeleteNodeSample.ts][nodetypesdeletenodesample] | deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json | +| [nodeTypesDeleteSample.ts][nodetypesdeletesample] | delete a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json | +| [nodeTypesGetFaultSimulationSample.ts][nodetypesgetfaultsimulationsample] | gets a fault simulation by the simulationId. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json | +| [nodeTypesGetSample.ts][nodetypesgetsample] | get a Service Fabric node type of a given managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json | +| [nodeTypesListByManagedClustersSample.ts][nodetypeslistbymanagedclusterssample] | gets all Node types of the specified managed cluster. x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json | +| [nodeTypesListFaultSimulationSample.ts][nodetypeslistfaultsimulationsample] | gets the list of recent fault simulations for the node type. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json | +| [nodeTypesRedeploySample.ts][nodetypesredeploysample] | redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json | +| [nodeTypesReimageSample.ts][nodetypesreimagesample] | reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json | +| [nodeTypesRestartSample.ts][nodetypesrestartsample] | restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json | +| [nodeTypesStartFaultSimulationSample.ts][nodetypesstartfaultsimulationsample] | starts a fault simulation on the node type. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json | +| [nodeTypesStartSample.ts][nodetypesstartsample] | starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. x-ms-original-file: 2025-06-01-preview/StartNodes_example.json | +| [nodeTypesStopFaultSimulationSample.ts][nodetypesstopfaultsimulationsample] | stops a fault simulation on the node type. x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json | +| [nodeTypesUpdateSample.ts][nodetypesupdatesample] | update the configuration of a node type of a given managed cluster, only updating tags. x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json | +| [operationResultsGetSample.ts][operationresultsgetsample] | get long running operation result. x-ms-original-file: 2025-06-01-preview/OperationResultsGet_example.json | +| [operationStatusGetSample.ts][operationstatusgetsample] | get long running operation status. x-ms-original-file: 2025-06-01-preview/OperationStatusFailed_example.json | +| [operationsListSample.ts][operationslistsample] | get the list of available Service Fabric resource provider API operations. x-ms-original-file: 2025-06-01-preview/OperationsList_example.json | +| [servicesCreateOrUpdateSample.ts][servicescreateorupdatesample] | create or update a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json | +| [servicesDeleteSample.ts][servicesdeletesample] | delete a Service Fabric managed service resource with the specified name. x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json | +| [servicesGetSample.ts][servicesgetsample] | get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json | +| [servicesListByApplicationsSample.ts][serviceslistbyapplicationssample] | gets all service resources created or in the process of being created in the Service Fabric managed application resource. x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json | +| [servicesUpdateSample.ts][servicesupdatesample] | updates the tags of a service resource of a given managed cluster. x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json | ## Prerequisites @@ -126,6 +135,7 @@ Take a look at our [API Documentation][apiref] for more information about the AP [applicationsresumeupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts [applicationsstartrollbacksample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts [applicationsupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts +[applicationsupdateupgradesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateUpgradeSample.ts [managedapplymaintenancewindowpostsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts [managedazresiliencystatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts [managedclusterversiongetbyenvironmentsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts @@ -134,9 +144,13 @@ Take a look at our [API Documentation][apiref] for more information about the AP [managedclusterversionlistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts [managedclusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts [managedclustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts +[managedclustersgetfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetFaultSimulationSample.ts [managedclustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts [managedclusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts [managedclusterslistbysubscriptionsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts +[managedclusterslistfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListFaultSimulationSample.ts +[managedclustersstartfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStartFaultSimulationSample.ts +[managedclustersstopfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStopFaultSimulationSample.ts [managedclustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts [managedmaintenancewindowstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts [managedunsupportedvmsizesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts @@ -146,12 +160,16 @@ Take a look at our [API Documentation][apiref] for more information about the AP [nodetypesdeallocatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeallocateSample.ts [nodetypesdeletenodesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts [nodetypesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts +[nodetypesgetfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetFaultSimulationSample.ts [nodetypesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts [nodetypeslistbymanagedclusterssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts +[nodetypeslistfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListFaultSimulationSample.ts [nodetypesredeploysample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRedeploySample.ts [nodetypesreimagesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts [nodetypesrestartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts +[nodetypesstartfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartFaultSimulationSample.ts [nodetypesstartsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartSample.ts +[nodetypesstopfaultsimulationsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStopFaultSimulationSample.ts [nodetypesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts [operationresultsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts [operationstatusgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json index 1b8e7f1c36e2..0c94e25623c0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/package.json @@ -32,7 +32,7 @@ "dependencies": { "@azure/arm-servicefabricmanagedclusters": "next", "dotenv": "latest", - "@azure/identity": "^4.6.0" + "@azure/identity": "^4.9.0" }, "devDependencies": { "@types/node": "^20.0.0", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts index 221e9c8f4a5b..dce54f3d3753 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsCreateOrUpdateSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a Service Fabric managed application type version resource with the specified name. * * @summary create or update a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPutOperation_example.json */ async function putAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.applicationTypeVersions.createOrUpdate( "resRg", "myCluster", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts index 07b9973e5d47..ecf8732aeb45 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsDeleteSample.ts @@ -8,21 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a Service Fabric managed application type version resource with the specified name. * * @summary delete a Service Fabric managed application type version resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionDeleteOperation_example.json */ async function deleteAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - await client.applicationTypeVersions.delete( - "resRg", - "myCluster", - "myAppType", - "1.0", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + await client.applicationTypeVersions.delete("resRg", "myCluster", "myAppType", "1.0"); } async function main(): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts index 37dc1e08b623..cd80b1af5d8f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsGetSample.ts @@ -8,21 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. * * @summary get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionGetOperation_example.json */ async function getAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypeVersions.get( - "resRg", - "myCluster", - "myAppType", - "1.0", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applicationTypeVersions.get("resRg", "myCluster", "myAppType", "1.0"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts index 59aa0b791ab8..093753fc03ee 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsListByApplicationTypesSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. * * @summary gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionListOperation_example.json */ async function getAListOfApplicationTypeVersionResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applicationTypeVersions.listByApplicationTypes( "resRg", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts index 1a56cac74382..5bcce3be187b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypeVersionsUpdateSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to updates the tags of an application type version resource of a given managed cluster. * * @summary updates the tags of an application type version resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeVersionPatchOperation_example.json */ async function patchAnApplicationTypeVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.applicationTypeVersions.update( "resRg", "myCluster", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts index 18a58aa983e7..d5535820b50f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesCreateOrUpdateSample.ts @@ -8,21 +8,15 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a Service Fabric managed application type name resource with the specified name. * * @summary create or update a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePutOperation_example.json */ async function putAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.createOrUpdate( - "resRg", - "myCluster", - "myAppType", - { location: "eastus" }, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applicationTypes.createOrUpdate("resRg", "myCluster", "myAppType", { + location: "eastus", + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts index f2a6468497f0..c260ac960055 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesDeleteSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a Service Fabric managed application type name resource with the specified name. * * @summary delete a Service Fabric managed application type name resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameDeleteOperation_example.json */ async function deleteAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.applicationTypes.delete("resRg", "myCluster", "myAppType"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts index 00bbbc0b3877..585bbdcd0ff6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesGetSample.ts @@ -8,20 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. * * @summary get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameGetOperation_example.json */ async function getAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.get( - "resRg", - "myCluster", - "myAppType", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applicationTypes.get("resRg", "myCluster", "myAppType"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts index c2b66c18642e..2865028b41ad 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesListSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. * * @summary gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNameListOperation_example.json */ async function getAListOfApplicationTypeNameResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applicationTypes.list("resRg", "myCluster")) { resArray.push(item); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts index f3cb28dc516a..746d5f963751 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationTypesUpdateSample.ts @@ -8,21 +8,15 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to updates the tags of an application type resource of a given managed cluster. * * @summary updates the tags of an application type resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationTypeNamePatchOperation_example.json */ async function patchAnApplicationType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applicationTypes.update( - "resRg", - "myCluster", - "myAppType", - { tags: { a: "b" } }, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applicationTypes.update("resRg", "myCluster", "myAppType", { + tags: { a: "b" }, + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts index bbf9a9e52718..37078c7b679b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsCreateOrUpdateSample.ts @@ -8,60 +8,52 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a Service Fabric managed application resource with the specified name. * * @summary create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_max.json */ async function putAnApplicationWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.createOrUpdate( - "resRg", - "myCluster", - "myApp", - { - location: "eastus", - properties: { - parameters: { param1: "value1" }, - upgradePolicy: { - applicationHealthPolicy: { - considerWarningAsError: true, - defaultServiceTypeHealthPolicy: { - maxPercentUnhealthyPartitionsPerService: 0, - maxPercentUnhealthyReplicasPerPartition: 0, - maxPercentUnhealthyServices: 0, - }, - maxPercentUnhealthyDeployedApplications: 0, - serviceTypeHealthPolicyMap: { - service1: { - maxPercentUnhealthyPartitionsPerService: 30, - maxPercentUnhealthyReplicasPerPartition: 30, - maxPercentUnhealthyServices: 30, - }, - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applications.createOrUpdate("resRg", "myCluster", "myApp", { + location: "eastus", + properties: { + parameters: { param1: "value1" }, + upgradePolicy: { + applicationHealthPolicy: { + considerWarningAsError: true, + defaultServiceTypeHealthPolicy: { + maxPercentUnhealthyPartitionsPerService: 0, + maxPercentUnhealthyReplicasPerPartition: 0, + maxPercentUnhealthyServices: 0, }, - forceRestart: false, - instanceCloseDelayDuration: 600, - recreateApplication: false, - rollingUpgradeMonitoringPolicy: { - failureAction: "Rollback", - healthCheckRetryTimeout: "00:10:00", - healthCheckStableDuration: "00:05:00", - healthCheckWaitDuration: "00:02:00", - upgradeDomainTimeout: "00:15:00", - upgradeTimeout: "01:00:00", + maxPercentUnhealthyDeployedApplications: 0, + serviceTypeHealthPolicyMap: { + service1: { + maxPercentUnhealthyPartitionsPerService: 30, + maxPercentUnhealthyReplicasPerPartition: 30, + maxPercentUnhealthyServices: 30, + }, }, - upgradeMode: "UnmonitoredAuto", - upgradeReplicaSetCheckTimeout: 3600, }, - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", + forceRestart: false, + instanceCloseDelayDuration: 600, + recreateApplication: false, + rollingUpgradeMonitoringPolicy: { + failureAction: "Rollback", + healthCheckRetryTimeout: "00:10:00", + healthCheckStableDuration: "00:05:00", + healthCheckWaitDuration: "00:02:00", + upgradeDomainTimeout: "00:15:00", + upgradeTimeout: "01:00:00", + }, + upgradeMode: "UnmonitoredAuto", + upgradeReplicaSetCheckTimeout: 3600, }, - tags: { a: "b" }, + version: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", }, - ); + tags: { a: "b" }, + }); console.log(result); } @@ -69,27 +61,19 @@ async function putAnApplicationWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric managed application resource with the specified name. * * @summary create or update a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationPutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPutOperation_example_min.json */ async function putAnApplicationWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.createOrUpdate( - "resRg", - "myCluster", - "myApp", - { - location: "eastus", - properties: { - version: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applications.createOrUpdate("resRg", "myCluster", "myApp", { + location: "eastus", + properties: { + version: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", }, - ); + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts index ea3ea868750f..cd2de7568af2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsDeleteSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a Service Fabric managed application resource with the specified name. * * @summary delete a Service Fabric managed application resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ApplicationDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationDeleteOperation_example.json */ async function deleteAnApplication(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.applications.delete("resRg", "myCluster", "myApp"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts index 45476ed5cf6a..1c55cd60f5bc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsGetSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. * * @summary get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationGetOperation_example.json */ async function getAnApplication(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.applications.get("resRg", "myCluster", "myApp"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts index 04945f773f7a..306feeb2338c 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsListSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. * * @summary gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - * x-ms-original-file: 2025-03-01-preview/ApplicationListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationListOperation_example.json */ async function getAListOfApplicationResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.applications.list("resRg", "myCluster")) { resArray.push(item); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts index 5f000be36c28..7f22af71a858 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsReadUpgradeSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. * * @summary get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionGetUpgrade_example.json */ async function getAnApplicationUpgrade(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.applications.readUpgrade("resRg", "myCluster", "myApp"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts index e52b5298fe79..ceb0c36d6ff5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsResumeUpgradeSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. * * @summary send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionResumeUpgrade_example.json */ async function resumeUpgrade(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.applications.resumeUpgrade("resRg", "myCluster", "myApp", { upgradeDomainName: "UD1", }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts index 594b5e571e77..09ba2f225106 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsStartRollbackSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. * * @summary send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - * x-ms-original-file: 2025-03-01-preview/ApplicationActionStartRollback_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationActionStartRollback_example.json */ async function startAnApplicationUpgradeRollback(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.applications.startRollback("resRg", "myCluster", "myApp"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts index dbd98ade0b29..a9f4f0fca701 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateSample.ts @@ -8,21 +8,15 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to updates the tags of an application resource of a given managed cluster. * * @summary updates the tags of an application resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ApplicationPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ApplicationPatchOperation_example.json */ async function patchAnApplication(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.applications.update( - "resRg", - "myCluster", - "myApp", - { tags: { a: "b" } }, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.applications.update("resRg", "myCluster", "myApp", { + tags: { a: "b" }, + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateUpgradeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateUpgradeSample.ts new file mode 100644 index 000000000000..3ebd11df2ea3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/applicationsUpdateUpgradeSample.ts @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to send a request to update the current application upgrade. + * + * @summary send a request to update the current application upgrade. + * x-ms-original-file: 2025-06-01-preview/ApplicationActionUpdateUpgrade_example.json + */ +async function updateAnApplicationUpgrade(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + await client.applications.updateUpgrade("resRg", "myCluster", "myApp", { + upgradeKind: "Rolling", + name: "fabric:/Voting", + updateDescription: { + rollingUpgradeMode: "Monitored", + forceRestart: true, + failureAction: "Manual", + healthCheckWaitDurationInMilliseconds: "PT0H0M10S", + healthCheckStableDurationInMilliseconds: "PT1H0M0S", + healthCheckRetryTimeoutInMilliseconds: "PT0H15M0S", + upgradeTimeoutInMilliseconds: "PT2H0M0S", + upgradeDomainTimeoutInMilliseconds: "PT2H0M0S", + }, + applicationHealthPolicy: { + considerWarningAsError: true, + maxPercentUnhealthyDeployedApplications: 10, + defaultServiceTypeHealthPolicy: { + maxPercentUnhealthyPartitionsPerService: 10, + maxPercentUnhealthyReplicasPerPartition: 11, + maxPercentUnhealthyServices: 12, + }, + serviceTypeHealthPolicyMap: { + VotingWeb: { + maxPercentUnhealthyPartitionsPerService: 13, + maxPercentUnhealthyReplicasPerPartition: 14, + maxPercentUnhealthyServices: 15, + }, + }, + }, + }); +} + +async function main(): Promise { + await updateAnApplicationUpgrade(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts index 985a65efb6c4..c4065d01669f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedApplyMaintenanceWindowPostSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. * * @summary action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - * x-ms-original-file: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedApplyMaintenanceWindowPost_example.json */ async function applyMaintenanceWindowStatus(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - await client.managedApplyMaintenanceWindow.post( - "resourceGroup1", - "mycluster1", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + await client.managedApplyMaintenanceWindow.post("resourceGroup1", "mycluster1"); } async function main(): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts index 4fae53932e1c..b4441847e8af 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedAzResiliencyStatusGetSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. * * @summary action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json + * x-ms-original-file: 2025-06-01-preview/managedAzResiliencyStatusGet_example.json */ async function azResiliencyStatusOfBaseResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedAzResiliencyStatus.get( - "resourceGroup1", - "mycluster1", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedAzResiliencyStatus.get("resourceGroup1", "mycluster1"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts index ac79981839a6..0a9929011413 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetByEnvironmentSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets information about an available Service Fabric cluster code version by environment. * * @summary gets information about an available Service Fabric cluster code version by environment. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGetByEnvironment_example.json */ async function getClusterVersionByEnvironment(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.managedClusterVersion.getByEnvironment( "eastus", "Windows", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts index 602a22e15db1..88bb3902f418 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionGetSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets information about an available Service Fabric managed cluster code version. * * @summary gets information about an available Service Fabric managed cluster code version. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionGet_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionGet_example.json */ async function getClusterVersion(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusterVersion.get( - "eastus", - "7.2.477.9590", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusterVersion.get("eastus", "7.2.477.9590"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts index e786d53826a9..48396fdba4a4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListByEnvironmentSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all available code versions for Service Fabric cluster resources by environment. * * @summary gets all available code versions for Service Fabric cluster resources by environment. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionListByEnvironment.json */ async function listClusterVersionsByEnvironment(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusterVersion.listByEnvironment( - "eastus", - "Windows", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusterVersion.listByEnvironment("eastus", "Windows"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts index 09bcd58cd76d..ebbfc9777b8b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClusterVersionListSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all available code versions for Service Fabric cluster resources by location. * * @summary gets all available code versions for Service Fabric cluster resources by location. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterVersionList_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterVersionList_example.json */ async function listClusterVersions(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.managedClusterVersion.list("eastus"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts index e9e4c077c6da..be467332e9e6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersCreateOrUpdateSample.ts @@ -8,143 +8,138 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a Service Fabric managed cluster resource with the specified name. * * @summary create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_max.json */ async function putAClusterWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.createOrUpdate( - "resRg", - "mycluster", - { - location: "eastus", - properties: { - addonFeatures: [ - "DnsService", - "BackupRestoreService", - "ResourceMonitorService", - ], - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - allocatedOutboundPorts: 0, - allowRdpAccess: true, - applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, - autoGeneratedDomainNameLabelScope: "SubscriptionReuse", - auxiliarySubnets: [ - { - name: "testSubnet1", - enableIpv6: true, - networkSecurityGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1", - privateEndpointNetworkPolicies: "enabled", - privateLinkServiceNetworkPolicies: "enabled", - }, - ], - clientConnectionPort: 19000, - clusterCodeVersion: "7.1.168.9494", - clusterUpgradeMode: "Manual", - ddosProtectionPlanId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan", - dnsName: "mycluster", - enableAutoOSUpgrade: true, - enableHttpGatewayExclusiveAuthMode: true, - enableIpv6: true, - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - httpGatewayConnectionPort: 19080, - httpGatewayTokenAuthConnectionPort: 19081, - ipTags: [{ ipTagType: "FirstPartyUsage", tag: "SQL" }], - loadBalancingRules: [ - { - backendPort: 80, - frontendPort: 80, - probePort: 80, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 443, - frontendPort: 443, - probePort: 443, - probeProtocol: "http", - protocol: "http", - }, - { - backendPort: 10000, - frontendPort: 10000, - loadDistribution: "Default", - probePort: 10000, - probeProtocol: "http", - protocol: "tcp", - }, - ], - networkSecurityRules: [ - { - name: "TestName", - description: "Test description", - access: "allow", - destinationAddressPrefixes: ["*"], - destinationPortRanges: ["*"], - direction: "inbound", - priority: 1010, - sourceAddressPrefixes: ["*"], - sourcePortRanges: ["*"], - protocol: "tcp", - }, - { - name: "AllowARM", - access: "allow", - destinationAddressPrefix: "*", - destinationPortRange: "33500-33699", - direction: "inbound", - priority: 2002, - sourceAddressPrefix: "AzureResourceManager", - sourcePortRange: "*", - protocol: "*", - }, - ], - publicIPPrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", - publicIPv6PrefixId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", - serviceEndpoints: [ - { locations: ["eastus2", "usnorth"], service: "Microsoft.Storage" }, - ], - upgradeDescription: { - deltaHealthPolicy: { - maxPercentDeltaUnhealthyApplications: 40, - maxPercentDeltaUnhealthyNodes: 20, - maxPercentUpgradeDomainDeltaUnhealthyNodes: 40, - }, - forceRestart: false, - healthPolicy: { - maxPercentUnhealthyApplications: 30, - maxPercentUnhealthyNodes: 10, - }, - monitoringPolicy: { - healthCheckRetryTimeout: "00:55:00", - healthCheckStableDuration: "00:45:00", - healthCheckWaitDuration: "00:05:00", - upgradeDomainTimeout: "03:00:00", - upgradeTimeout: "12:00:00", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.createOrUpdate("resRg", "mycluster", { + location: "eastus", + properties: { + addonFeatures: ["DnsService", "BackupRestoreService", "ResourceMonitorService"], + adminPassword: "{vm-password}", + adminUserName: "vmadmin", + allocatedOutboundPorts: 0, + allowRdpAccess: true, + applicationTypeVersionsCleanupPolicy: { maxUnusedVersionsToKeep: 3 }, + autoGeneratedDomainNameLabelScope: "SubscriptionReuse", + auxiliarySubnets: [ + { + name: "testSubnet1", + enableIpv6: true, + networkSecurityGroupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1", + privateEndpointNetworkPolicies: "enabled", + privateLinkServiceNetworkPolicies: "enabled", + }, + ], + clientConnectionPort: 19000, + clusterCodeVersion: "7.1.168.9494", + clusterUpgradeMode: "Manual", + ddosProtectionPlanId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan", + dnsName: "mycluster", + enableAutoOSUpgrade: true, + enableHttpGatewayExclusiveAuthMode: true, + enableIpv6: true, + fabricSettings: [ + { + name: "ManagedIdentityTokenService", + parameters: [{ name: "IsEnabled", value: "true" }], + }, + ], + httpGatewayConnectionPort: 19080, + httpGatewayTokenAuthConnectionPort: 19081, + ipTags: [{ ipTagType: "FirstPartyUsage", tag: "SQL" }], + loadBalancingRules: [ + { + backendPort: 80, + frontendPort: 80, + probePort: 80, + probeProtocol: "http", + protocol: "http", + }, + { + backendPort: 443, + frontendPort: 443, + probePort: 443, + probeProtocol: "http", + protocol: "http", + }, + { + backendPort: 10000, + frontendPort: 10000, + loadDistribution: "Default", + probePort: 10000, + probeProtocol: "http", + protocol: "tcp", + }, + ], + networkSecurityRules: [ + { + name: "TestName", + description: "Test description", + access: "allow", + destinationAddressPrefixes: ["*"], + destinationPortRanges: ["*"], + direction: "inbound", + priority: 1010, + sourceAddressPrefixes: ["*"], + sourcePortRanges: ["*"], + protocol: "tcp", + }, + { + name: "AllowARM", + access: "allow", + destinationAddressPrefix: "*", + destinationPortRange: "33500-33699", + direction: "inbound", + priority: 2002, + sourceAddressPrefix: "AzureResourceManager", + sourcePortRange: "*", + protocol: "*", + }, + ], + publicIPPrefixId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix", + publicIPv6PrefixId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix", + serviceEndpoints: [ + { + locations: ["eastus2", "usnorth"], + service: "Microsoft.Storage", + networkIdentifier: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/publicIPAddresses/myPublicIP", + }, + ], + upgradeDescription: { + deltaHealthPolicy: { + maxPercentDeltaUnhealthyApplications: 40, + maxPercentDeltaUnhealthyNodes: 20, + maxPercentUpgradeDomainDeltaUnhealthyNodes: 40, + }, + forceRestart: false, + healthPolicy: { + maxPercentUnhealthyApplications: 30, + maxPercentUnhealthyNodes: 10, + }, + monitoringPolicy: { + healthCheckRetryTimeout: "00:55:00", + healthCheckStableDuration: "00:45:00", + healthCheckWaitDuration: "00:05:00", + upgradeDomainTimeout: "03:00:00", + upgradeTimeout: "12:00:00", }, - useCustomVnet: true, - zonalResiliency: true, - zonalUpdateMode: "Fast", }, - sku: { name: "Basic" }, - tags: {}, + useCustomVnet: true, + zonalResiliency: true, + zonalUpdateMode: "Fast", + enableOutboundOnlyNodeTypes: true, }, - ); + sku: { name: "Basic" }, + tags: {}, + }); console.log(result); } @@ -152,36 +147,29 @@ async function putAClusterWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric managed cluster resource with the specified name. * * @summary create or update a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPutOperation_example_min.json */ async function putAClusterWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedClusters.createOrUpdate( - "resRg", - "myCluster", - { - location: "eastus", - properties: { - adminPassword: "{vm-password}", - adminUserName: "vmadmin", - clusterUpgradeCadence: "Wave1", - clusterUpgradeMode: "Automatic", - dnsName: "myCluster", - fabricSettings: [ - { - name: "ManagedIdentityTokenService", - parameters: [{ name: "IsEnabled", value: "true" }], - }, - ], - }, - sku: { name: "Basic" }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.createOrUpdate("resRg", "myCluster", { + location: "eastus", + properties: { + adminPassword: "{vm-password}", + adminUserName: "vmadmin", + clusterUpgradeCadence: "Wave1", + clusterUpgradeMode: "Automatic", + dnsName: "myCluster", + fabricSettings: [ + { + name: "ManagedIdentityTokenService", + parameters: [{ name: "IsEnabled", value: "true" }], + }, + ], }, - ); + sku: { name: "Basic" }, + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts index 0f7ed8654b74..e51d7a316dc3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersDeleteSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a Service Fabric managed cluster resource with the specified name. * * @summary delete a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterDeleteOperation_example.json */ async function deleteACluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.managedClusters.delete("resRg", "myCluster"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetFaultSimulationSample.ts new file mode 100644 index 000000000000..dc1ca67a23c0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets a fault simulation by the simulationId. + * + * @summary gets a fault simulation by the simulationId. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterGetFaultSimulation_example.json + */ +async function getManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.getFaultSimulation("resRg", "myCluster", { + simulationId: "aec13cc2-1d39-4ba6-a1a8-2fc35b00643c", + }); + console.log(result); +} + +async function main(): Promise { + await getManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts index 752e6c0ed982..b3a74335aaca 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersGetSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. * * @summary get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterGetOperation_example.json */ async function getACluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.managedClusters.get("resRg", "myCluster"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts index b95ed6138695..55e48e2ae72e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListByResourceGroupSample.ts @@ -8,19 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all Service Fabric cluster resources created or in the process of being created in the resource group. * * @summary gets all Service Fabric cluster resources created or in the process of being created in the resource group. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterListByResourceGroupOperation_example.json */ async function listClusterByResourceGroup(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.managedClusters.listByResourceGroup( - "resRg", - )) { + for await (const item of client.managedClusters.listByResourceGroup("resRg")) { resArray.push(item); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts index ee4d543594d7..0ba9ad7454c3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListBySubscriptionSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all Service Fabric cluster resources created or in the process of being created in the subscription. * * @summary gets all Service Fabric cluster resources created or in the process of being created in the subscription. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterListBySubscriptionOperation_example.json */ async function listManagedClusters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.managedClusters.listBySubscription()) { resArray.push(item); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListFaultSimulationSample.ts new file mode 100644 index 000000000000..e6412b291425 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersListFaultSimulationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of recent fault simulations for the cluster. + * + * @summary gets the list of recent fault simulations for the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterListFaultSimulation_example.json + */ +async function listManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.managedClusters.listFaultSimulation("resRg", "myCluster")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStartFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStartFaultSimulationSample.ts new file mode 100644 index 000000000000..ea603ff23025 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStartFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to starts a fault simulation on the cluster. + * + * @summary starts a fault simulation on the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStartFaultSimulation_example.json + */ +async function startManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.startFaultSimulation("resRg", "myCluster", { + parameters: { faultKind: "Zone", zones: ["2"] }, + }); + console.log(result); +} + +async function main(): Promise { + await startManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStopFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStopFaultSimulationSample.ts new file mode 100644 index 000000000000..c9e9ca452e39 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersStopFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to stops a fault simulation on the cluster. + * + * @summary stops a fault simulation on the cluster. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/ManagedClusterStopFaultSimulation_example.json + */ +async function stopManagedClusterFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedClusters.stopFaultSimulation("resRg", "myCluster", { + simulationId: "1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3", + }); + console.log(result); +} + +async function main(): Promise { + await stopManagedClusterFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts index dce03ab08af2..ad86efe2b362 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedClustersUpdateSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to update the tags of of a Service Fabric managed cluster resource with the specified name. * * @summary update the tags of of a Service Fabric managed cluster resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedClusterPatchOperation_example.json */ async function patchAManagedCluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.managedClusters.update("resRg", "myCluster", { tags: { a: "b" }, }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts index 5ba70bb12875..4882382c0755 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedMaintenanceWindowStatusGetSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to action to get Maintenance Window Status of the Service Fabric Managed Clusters. * * @summary action to get Maintenance Window Status of the Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json + * x-ms-original-file: 2025-06-01-preview/ManagedMaintenanceWindowStatusGet_example.json */ async function getMaintenanceWindowStatus(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedMaintenanceWindowStatus.get( - "resourceGroup1", - "mycluster1", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedMaintenanceWindowStatus.get("resourceGroup1", "mycluster1"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts index ff12dc4c34a3..5f27af9cebac 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesGetSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get unsupported vm size for Service Fabric Managed Clusters. * * @summary get unsupported vm size for Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json + * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesGet_example.json */ async function getUnsupportedVmSizes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.managedUnsupportedVMSizes.get( - "eastus", - "Standard_B1ls1", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.managedUnsupportedVMSizes.get("eastus", "Standard_B1ls1"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts index 07e7782ced5a..e016a97fb948 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/managedUnsupportedVMSizesListSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get the lists of unsupported vm sizes for Service Fabric Managed Clusters. * * @summary get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - * x-ms-original-file: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json + * x-ms-original-file: 2025-06-01-preview/managedUnsupportedVMSizesList_example.json */ async function listUnsupportedVmSizes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.managedUnsupportedVMSizes.list("eastus")) { resArray.push(item); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts index b9bc6f197af1..0bf45321aa9d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypeSkusListSample.ts @@ -8,21 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric node type supported SKUs. * * @summary get a Service Fabric node type supported SKUs. - * x-ms-original-file: 2025-03-01-preview/NodeTypeSkusListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeSkusListOperation_example.json */ async function listANodeTypeSKUs(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.nodeTypeSkus.list( - "resRg", - "myCluster", - "BE", - )) { + for await (const item of client.nodeTypeSkus.list("resRg", "myCluster", "BE")) { resArray.push(item); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts index 4979adff398c..4542bd6ab4b1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesCreateOrUpdateSample.ts @@ -8,73 +8,65 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationAutoScale_example.json */ async function putANodeTypeWithAutoScaleParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - capacities: { ClientConnections: "65536" }, - dataDiskSizeGB: 200, - dataDiskType: "Premium_LRS", - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - placementProperties: { - HasSSD: "true", - NodeColor: "green", - SomeProperty: "5", - }, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - properties: { - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + capacities: { ClientConnections: "65536" }, + dataDiskSizeGB: 200, + dataDiskType: "Premium_LRS", + isPrimary: false, + isStateless: true, + multiplePlacementGroups: true, + placementProperties: { + HasSSD: "true", + NodeColor: "green", + SomeProperty: "5", + }, + vmExtensions: [ + { + name: "Microsoft.Azure.Geneva.GenevaMonitoring", + properties: { + type: "GenevaMonitoring", + autoUpgradeMinorVersion: true, + publisher: "Microsoft.Azure.Geneva", + settings: {}, + typeHandlerVersion: "2.0", }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: -1, - vmManagedIdentity: { - userAssignedIdentities: [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", - ], }, - vmSecrets: [ - { - sourceVault: { - id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", - }, - vaultCertificates: [ - { - certificateStore: "My", - certificateUrl: - "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", - }, - ], - }, + ], + vmImageOffer: "WindowsServer", + vmImagePublisher: "MicrosoftWindowsServer", + vmImageSku: "2016-Datacenter-Server-Core", + vmImageVersion: "latest", + vmInstanceCount: -1, + vmManagedIdentity: { + userAssignedIdentities: [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2", ], - vmSize: "Standard_DS3", }, + vmSecrets: [ + { + sourceVault: { + id: "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault", + }, + vaultCertificates: [ + { + certificateStore: "My", + certificateUrl: + "https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c", + }, + ], + }, + ], + vmSize: "Standard_DS3", }, - ); + }); console.log(result); } @@ -82,30 +74,22 @@ async function putANodeTypeWithAutoScaleParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomImage_example.json */ async function putNodeTypeWithCustomVmImage(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageResourceId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + dataDiskSizeGB: 200, + isPrimary: false, + vmImageResourceId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC", + vmInstanceCount: 10, + vmSize: "Standard_D3", }, - ); + }); console.log(result); } @@ -113,30 +97,22 @@ async function putNodeTypeWithCustomVmImage(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json */ async function putNodeTypeWithSharedGalleriesCustomVmImage(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - dataDiskSizeGB: 200, - isPrimary: false, - vmInstanceCount: 10, - vmSharedGalleryImageId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest", - vmSize: "Standard_D3", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + dataDiskSizeGB: 200, + isPrimary: false, + vmInstanceCount: 10, + vmSharedGalleryImageId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest", + vmSize: "Standard_D3", }, - ); + }); console.log(result); } @@ -144,38 +120,30 @@ async function putNodeTypeWithSharedGalleriesCustomVmImage(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationDedicatedHost_example.json */ async function putNodeTypeWithDedicatedHosts(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - capacities: {}, - dataDiskSizeGB: 200, - dataDiskType: "StandardSSD_LRS", - hostGroupId: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - isPrimary: false, - placementProperties: {}, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2019-Datacenter", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D8s_v3", - zones: ["1"], - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + capacities: {}, + dataDiskSizeGB: 200, + dataDiskType: "StandardSSD_LRS", + hostGroupId: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", + isPrimary: false, + placementProperties: {}, + vmImageOffer: "WindowsServer", + vmImagePublisher: "MicrosoftWindowsServer", + vmImageSku: "2019-Datacenter", + vmImageVersion: "latest", + vmInstanceCount: 10, + vmSize: "Standard_D8s_v3", + zones: ["1"], }, - ); + }); console.log(result); } @@ -183,47 +151,39 @@ async function putNodeTypeWithDedicatedHosts(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationStateless_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationStateless_example.json */ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - enableEncryptionAtHost: true, - isPrimary: false, - isStateless: true, - multiplePlacementGroups: true, - useTempDataDisk: true, - vmExtensions: [ - { - name: "Microsoft.Azure.Geneva.GenevaMonitoring", - properties: { - type: "GenevaMonitoring", - autoUpgradeMinorVersion: true, - publisher: "Microsoft.Azure.Geneva", - settings: {}, - typeHandlerVersion: "2.0", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + enableEncryptionAtHost: true, + isPrimary: false, + isStateless: true, + multiplePlacementGroups: true, + useTempDataDisk: true, + vmExtensions: [ + { + name: "Microsoft.Azure.Geneva.GenevaMonitoring", + properties: { + type: "GenevaMonitoring", + autoUpgradeMinorVersion: true, + publisher: "Microsoft.Azure.Geneva", + settings: {}, + typeHandlerVersion: "2.0", }, - ], - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_DS3", - }, + }, + ], + vmImageOffer: "WindowsServer", + vmImagePublisher: "MicrosoftWindowsServer", + vmImageSku: "2016-Datacenter-Server-Core", + vmImageVersion: "latest", + vmInstanceCount: 10, + vmSize: "Standard_DS3", }, - ); + }); console.log(result); } @@ -231,37 +191,29 @@ async function putAnStatelessNodeTypeWithTemporaryDiskForServiceFabric(): Promis * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperationVmImagePlan_example.json */ async function putNodeTypeWithVmImagePlan(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "windows_2022_test", - vmImagePlan: { - name: "win_2022_test_20_10_gen2", - product: "windows_2022_test", - publisher: "testpublisher", - }, - vmImagePublisher: "testpublisher", - vmImageSku: "win_2022_test_20_10_gen2", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + dataDiskSizeGB: 200, + isPrimary: false, + vmImageOffer: "windows_2022_test", + vmImagePlan: { + name: "win_2022_test_20_10_gen2", + product: "windows_2022_test", + publisher: "testpublisher", }, + vmImagePublisher: "testpublisher", + vmImageSku: "win_2022_test_20_10_gen2", + vmImageVersion: "latest", + vmInstanceCount: 10, + vmSize: "Standard_D3", }, - ); + }); console.log(result); } @@ -269,15 +221,12 @@ async function putNodeTypeWithVmImagePlan(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_max.json */ async function putANodeTypeWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.nodeTypes.createOrUpdate( "resRg", "myCluster", @@ -429,6 +378,7 @@ async function putANodeTypeWithMaximumParameters(): Promise { ], vmSetupActions: ["EnableContainers", "EnableHyperV"], vmSize: "Standard_DS3", + isOutboundOnly: true, }, }, ); @@ -439,32 +389,24 @@ async function putANodeTypeWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric node type of a given managed cluster. * * @summary create or update a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypePutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePutOperation_example_min.json */ async function putANodeTypeWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.nodeTypes.createOrUpdate( - "resRg", - "myCluster", - "BE", - { - properties: { - dataDiskSizeGB: 200, - isPrimary: false, - vmImageOffer: "WindowsServer", - vmImagePublisher: "MicrosoftWindowsServer", - vmImageSku: "2016-Datacenter-Server-Core", - vmImageVersion: "latest", - vmInstanceCount: 10, - vmSize: "Standard_D3", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.createOrUpdate("resRg", "myCluster", "BE", { + properties: { + dataDiskSizeGB: 200, + isPrimary: false, + vmImageOffer: "WindowsServer", + vmImagePublisher: "MicrosoftWindowsServer", + vmImageSku: "2016-Datacenter-Server-Core", + vmImageVersion: "latest", + vmInstanceCount: 10, + vmSize: "Standard_D3", }, - ); + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeallocateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeallocateSample.ts index b406d1082221..20ff05ac9012 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeallocateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeallocateSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. * * @summary deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. - * x-ms-original-file: 2025-03-01-preview/DeallocateNodes_example.json + * x-ms-original-file: 2025-06-01-preview/DeallocateNodes_example.json */ async function deallocateNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.deallocate("resRg", "myCluster", "BE", { nodes: ["BE_0", "BE_1"], }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts index 2078699e47bd..a1db97e748c2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteNodeSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. * * @summary deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - * x-ms-original-file: 2025-03-01-preview/DeleteNodes_example.json + * x-ms-original-file: 2025-06-01-preview/DeleteNodes_example.json */ async function deleteNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.deleteNode("resRg", "myCluster", "BE", { nodes: ["BE_0", "BE_3"], }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts index b967c5bcf525..2b39888e53a1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesDeleteSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a Service Fabric node type of a given managed cluster. * * @summary delete a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeDeleteOperation_example.json */ async function deleteANodeType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.delete("resRg", "myCluster", "BE"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetFaultSimulationSample.ts new file mode 100644 index 000000000000..f72f3d9842d6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets a fault simulation by the simulationId. + * + * @summary gets a fault simulation by the simulationId. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeGetFaultSimulation_example.json + */ +async function getNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.getFaultSimulation("resRg", "myCluster", "BE", { + simulationId: "aec13cc2-1d39-4ba6-a1a8-2fc35b00643c", + }); + console.log(result); +} + +async function main(): Promise { + await getNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts index d9fbe2bdf82d..6c37e7b8b5d4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesGetSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric node type of a given managed cluster. * * @summary get a Service Fabric node type of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeGetOperation_example.json */ async function getANodeType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.nodeTypes.get("resRg", "myCluster", "FE"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts index c9389b2cd1e1..ee93264efa73 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListByManagedClustersSample.ts @@ -8,20 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all Node types of the specified managed cluster. * * @summary gets all Node types of the specified managed cluster. - * x-ms-original-file: 2025-03-01-preview/NodeTypeListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypeListOperation_example.json */ async function listNodeTypeOfTheSpecifiedManagedCluster(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.nodeTypes.listByManagedClusters( - "resRg", - "myCluster", - )) { + for await (const item of client.nodeTypes.listByManagedClusters("resRg", "myCluster")) { resArray.push(item); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListFaultSimulationSample.ts new file mode 100644 index 000000000000..ee71f122b3fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesListFaultSimulationSample.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to gets the list of recent fault simulations for the node type. + * + * @summary gets the list of recent fault simulations for the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeListFaultSimulation_example.json + */ +async function listNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (const item of client.nodeTypes.listFaultSimulation("resRg", "myCluster", "BE")) { + resArray.push(item); + } + + console.log(resArray); +} + +async function main(): Promise { + await listNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRedeploySample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRedeploySample.ts index 1d3d82e1d17e..9deb119037ff 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRedeploySample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRedeploySample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. * * @summary redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. - * x-ms-original-file: 2025-03-01-preview/RedeployNodes_UD_example.json + * x-ms-original-file: 2025-06-01-preview/RedeployNodes_UD_example.json */ async function redeployAllNodesByUpgradeDomain(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.redeploy("resRg", "myCluster", "BE", { updateType: "ByUpgradeDomain", }); @@ -26,15 +23,12 @@ async function redeployAllNodesByUpgradeDomain(): Promise { * This sample demonstrates how to redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. * * @summary redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. - * x-ms-original-file: 2025-03-01-preview/RedeployNodes_example.json + * x-ms-original-file: 2025-06-01-preview/RedeployNodes_example.json */ async function redeployNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.redeploy("resRg", "myCluster", "BE", { nodes: ["BE_0", "BE_1"], }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts index 9230028be6ca..cf83f377dbcb 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesReimageSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/ReimageNodes_UD_example.json + * x-ms-original-file: 2025-06-01-preview/ReimageNodes_UD_example.json */ async function reimageAllNodesByUpgradeDomain(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.reimage("resRg", "myCluster", "BE", { updateType: "ByUpgradeDomain", }); @@ -26,15 +23,12 @@ async function reimageAllNodesByUpgradeDomain(): Promise { * This sample demonstrates how to reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. * * @summary reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/ReimageNodes_example.json + * x-ms-original-file: 2025-06-01-preview/ReimageNodes_example.json */ async function reimageNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.reimage("resRg", "myCluster", "BE", { nodes: ["BE_0", "BE_3"], }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts index e2db7eee0bd6..32c32a53882e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesRestartSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. * * @summary restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - * x-ms-original-file: 2025-03-01-preview/RestartNodes_example.json + * x-ms-original-file: 2025-06-01-preview/RestartNodes_example.json */ async function restartNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.restart("resRg", "myCluster", "BE", { nodes: ["BE_0", "BE_3"], }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartFaultSimulationSample.ts new file mode 100644 index 000000000000..a5da885a944b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to starts a fault simulation on the node type. + * + * @summary starts a fault simulation on the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStartFaultSimulation_example.json + */ +async function startNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.startFaultSimulation("resRg", "myCluster", "BE", { + parameters: { faultKind: "Zone", zones: ["2"] }, + }); + console.log(result); +} + +async function main(): Promise { + await startNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartSample.ts index 00f00a35e63f..d9e3f48ade6f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStartSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. * * @summary starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. - * x-ms-original-file: 2025-03-01-preview/StartNodes_example.json + * x-ms-original-file: 2025-06-01-preview/StartNodes_example.json */ async function startNodes(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.nodeTypes.start("resRg", "myCluster", "BE", { nodes: ["BE_0", "BE_1"], }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStopFaultSimulationSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStopFaultSimulationSample.ts new file mode 100644 index 000000000000..68badac2b113 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesStopFaultSimulationSample.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { ServiceFabricManagedClustersManagementClient } from "@azure/arm-servicefabricmanagedclusters"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to stops a fault simulation on the node type. + * + * @summary stops a fault simulation on the node type. + * x-ms-original-file: 2025-06-01-preview/faultSimulation/NodeTypeStopFaultSimulation_example.json + */ +async function stopNodeTypeFaultSimulation(): Promise { + const credential = new DefaultAzureCredential(); + const subscriptionId = "00000000-0000-0000-0000-000000000000"; + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.nodeTypes.stopFaultSimulation("resRg", "myCluster", "BE", { + simulationId: "1bb61ba9-8a41-4d73-b5f0-7fc93b1edfe3", + }); + console.log(result); +} + +async function main(): Promise { + await stopNodeTypeFaultSimulation(); +} + +main().catch(console.error); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts index 1b3a56301b2c..34f185cd770d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/nodeTypesUpdateSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to update the configuration of a node type of a given managed cluster, only updating tags. * * @summary update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperationAutoScale_example.json */ async function patchANodeTypeWhileAutoScaling(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.nodeTypes.update("resRg", "myCluster", "BE", { sku: { name: "Standard_S0", capacity: 10, tier: "Standard" }, tags: { a: "b" }, @@ -28,15 +25,12 @@ async function patchANodeTypeWhileAutoScaling(): Promise { * This sample demonstrates how to update the configuration of a node type of a given managed cluster, only updating tags. * * @summary update the configuration of a node type of a given managed cluster, only updating tags. - * x-ms-original-file: 2025-03-01-preview/NodeTypePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/NodeTypePatchOperation_example.json */ async function patchANodeType(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const result = await client.nodeTypes.update("resRg", "myCluster", "BE", { tags: { a: "b" }, }); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts index 3635e9b19495..0e594b031a5b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationResultsGetSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get long running operation result. * * @summary get long running operation result. - * x-ms-original-file: 2025-03-01-preview/OperationResultsGet_example.json + * x-ms-original-file: 2025-06-01-preview/OperationResultsGet_example.json */ async function getLongRunningOperationResult(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - await client.operationResults.get( - "eastus", - "00000000-0000-0000-0000-000000001234", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + await client.operationResults.get("eastus", "00000000-0000-0000-0000-000000001234"); } async function main(): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts index 5fdbc850c787..9d80521cc035 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationStatusGetSample.ts @@ -8,19 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get long running operation status. * * @summary get long running operation status. - * x-ms-original-file: 2025-03-01-preview/OperationStatusFailed_example.json + * x-ms-original-file: 2025-06-01-preview/OperationStatusFailed_example.json */ async function errorResponseDescribingWhyTheOperationFailed(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.operationStatus.get( - "eastus", - "00000000-0000-0000-0000-000000001234", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.operationStatus.get("eastus", "00000000-0000-0000-0000-000000001234"); console.log(result); } @@ -28,19 +22,13 @@ async function errorResponseDescribingWhyTheOperationFailed(): Promise { * This sample demonstrates how to get long running operation status. * * @summary get long running operation status. - * x-ms-original-file: 2025-03-01-preview/OperationStatusSucceeded_example.json + * x-ms-original-file: 2025-06-01-preview/OperationStatusSucceeded_example.json */ async function okTheRequestHasSucceeded(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.operationStatus.get( - "eastus", - "00000000-0000-0000-0000-000000001234", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.operationStatus.get("eastus", "00000000-0000-0000-0000-000000001234"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts index 930e74b751c4..f922e290c38f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/operationsListSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get the list of available Service Fabric resource provider API operations. * * @summary get the list of available Service Fabric resource provider API operations. - * x-ms-original-file: 2025-03-01-preview/OperationsList_example.json + * x-ms-original-file: 2025-06-01-preview/OperationsList_example.json */ async function listTheOperationsForTheProvider(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-00000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); for await (const item of client.operations.list()) { resArray.push(item); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts index 10bcc8108cb0..82bf9d1b23d0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesCreateOrUpdateSample.ts @@ -8,65 +8,54 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to create or update a Service Fabric managed service resource with the specified name. * * @summary create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_max.json + * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_max.json */ async function putAServiceWithMaximumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.createOrUpdate( - "resRg", - "myCluster", - "myApp", - "myService", - { - location: "eastus", - properties: { - correlationScheme: [ - { - scheme: "AlignedAffinity", - serviceName: - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1", + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.services.createOrUpdate("resRg", "myCluster", "myApp", "myService", { + location: "eastus", + properties: { + correlationScheme: [ + { + scheme: "AlignedAffinity", + serviceName: + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1", + }, + ], + defaultMoveCost: "Medium", + instanceCount: 5, + minInstanceCount: 3, + minInstancePercentage: 30, + partitionDescription: { partitionScheme: "Singleton" }, + placementConstraints: "NodeType==frontend", + scalingPolicies: [ + { + scalingMechanism: { + kind: "ScalePartitionInstanceCount", + maxInstanceCount: 9, + minInstanceCount: 3, + scaleIncrement: 2, }, - ], - defaultMoveCost: "Medium", - instanceCount: 5, - minInstanceCount: 3, - minInstancePercentage: 30, - partitionDescription: { partitionScheme: "Singleton" }, - placementConstraints: "NodeType==frontend", - scalingPolicies: [ - { - scalingMechanism: { - kind: "ScalePartitionInstanceCount", - maxInstanceCount: 9, - minInstanceCount: 3, - scaleIncrement: 2, - }, - scalingTrigger: { - kind: "AveragePartitionLoadTrigger", - lowerLoadThreshold: 2, - metricName: "metricName", - scaleInterval: "00:01:00", - upperLoadThreshold: 8, - }, + scalingTrigger: { + kind: "AveragePartitionLoadTrigger", + lowerLoadThreshold: 2, + metricName: "metricName", + scaleInterval: "00:01:00", + upperLoadThreshold: 8, }, - ], - serviceDnsName: "myservicednsname.myApp", - serviceKind: "Stateless", - serviceLoadMetrics: [ - { name: "metric1", defaultLoad: 3, weight: "Low" }, - ], - servicePackageActivationMode: "SharedProcess", - servicePlacementPolicies: [{ type: "NonPartiallyPlaceService" }], - serviceTypeName: "myServiceType", - }, - tags: { a: "b" }, + }, + ], + serviceDnsName: "myservicednsname.myApp", + serviceKind: "Stateless", + serviceLoadMetrics: [{ name: "metric1", defaultLoad: 3, weight: "Low" }], + servicePackageActivationMode: "SharedProcess", + servicePlacementPolicies: [{ type: "NonPartiallyPlaceService" }], + serviceTypeName: "myServiceType", }, - ); + tags: { a: "b" }, + }); console.log(result); } @@ -74,30 +63,21 @@ async function putAServiceWithMaximumParameters(): Promise { * This sample demonstrates how to create or update a Service Fabric managed service resource with the specified name. * * @summary create or update a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServicePutOperation_example_min.json + * x-ms-original-file: 2025-06-01-preview/ServicePutOperation_example_min.json */ async function putAServiceWithMinimumParameters(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.createOrUpdate( - "resRg", - "myCluster", - "myApp", - "myService", - { - location: "eastus", - properties: { - instanceCount: 1, - partitionDescription: { partitionScheme: "Singleton" }, - serviceKind: "Stateless", - serviceTypeName: "myServiceType", - }, + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.services.createOrUpdate("resRg", "myCluster", "myApp", "myService", { + location: "eastus", + properties: { + instanceCount: 1, + partitionDescription: { partitionScheme: "Singleton" }, + serviceKind: "Stateless", + serviceTypeName: "myServiceType", }, - ); + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts index 1a6834590de8..05732ac32f0a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesDeleteSample.ts @@ -8,15 +8,12 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to delete a Service Fabric managed service resource with the specified name. * * @summary delete a Service Fabric managed service resource with the specified name. - * x-ms-original-file: 2025-03-01-preview/ServiceDeleteOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceDeleteOperation_example.json */ async function deleteAService(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); await client.services.delete("resRg", "myCluster", "myApp", "myService"); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts index 7e271bdc9bee..309183ce99e4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesGetSample.ts @@ -8,21 +8,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. * * @summary get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: 2025-03-01-preview/ServiceGetOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceGetOperation_example.json */ async function getAService(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.get( - "resRg", - "myCluster", - "myApp", - "myService", - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.services.get("resRg", "myCluster", "myApp", "myService"); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts index aac92fde7e18..dc4e2a5f3a32 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesListByApplicationsSample.ts @@ -8,21 +8,14 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to gets all service resources created or in the process of being created in the Service Fabric managed application resource. * * @summary gets all service resources created or in the process of being created in the Service Fabric managed application resource. - * x-ms-original-file: 2025-03-01-preview/ServiceListOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServiceListOperation_example.json */ async function getAListOfServiceResources(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); const resArray = new Array(); - for await (const item of client.services.listByApplications( - "resRg", - "myCluster", - "myApp", - )) { + for await (const item of client.services.listByApplications("resRg", "myCluster", "myApp")) { resArray.push(item); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts index 4791cbc62a26..11a54298f039 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/samples/v1-beta/typescript/src/servicesUpdateSample.ts @@ -8,22 +8,15 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to updates the tags of a service resource of a given managed cluster. * * @summary updates the tags of a service resource of a given managed cluster. - * x-ms-original-file: 2025-03-01-preview/ServicePatchOperation_example.json + * x-ms-original-file: 2025-06-01-preview/ServicePatchOperation_example.json */ async function patchAService(): Promise { const credential = new DefaultAzureCredential(); const subscriptionId = "00000000-0000-0000-0000-000000000000"; - const client = new ServiceFabricManagedClustersManagementClient( - credential, - subscriptionId, - ); - const result = await client.services.update( - "resRg", - "myCluster", - "myApp", - "myService", - { tags: { a: "b" } }, - ); + const client = new ServiceFabricManagedClustersManagementClient(credential, subscriptionId); + const result = await client.services.update("resRg", "myCluster", "myApp", "myService", { + tags: { a: "b" }, + }); console.log(result); } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/operations.ts index 5bb97a601c82..29ce558a0672 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/operations.ts @@ -1,37 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + ApplicationTypeVersionResource, + ApplicationTypeVersionUpdateParameters, + _ApplicationTypeVersionResourceList, +} from "../../models/models.js"; import { errorResponseDeserializer, - ApplicationTypeVersionResource, applicationTypeVersionResourceSerializer, applicationTypeVersionResourceDeserializer, - ApplicationTypeVersionUpdateParameters, applicationTypeVersionUpdateParametersSerializer, - _ApplicationTypeVersionResourceList, _applicationTypeVersionResourceListDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { ApplicationTypeVersionsListByApplicationTypesOptionalParams, ApplicationTypeVersionsDeleteOptionalParams, ApplicationTypeVersionsUpdateOptionalParams, ApplicationTypeVersionsCreateOrUpdateOptionalParams, ApplicationTypeVersionsGetOptionalParams, } from "./options.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _listByApplicationTypesSend( context: Client, @@ -125,13 +121,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/options.ts index bdd30ba2ebc8..58339792b9e0 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypeVersions/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ApplicationTypeVersionsListByApplicationTypesOptionalParams diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/operations.ts index 4607e0a227cf..c4a05d10a01b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/operations.ts @@ -1,37 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + ApplicationTypeResource, + ApplicationTypeUpdateParameters, + _ApplicationTypeResourceList, +} from "../../models/models.js"; import { errorResponseDeserializer, - ApplicationTypeResource, applicationTypeResourceSerializer, applicationTypeResourceDeserializer, - ApplicationTypeUpdateParameters, applicationTypeUpdateParametersSerializer, - _ApplicationTypeResourceList, _applicationTypeResourceListDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { ApplicationTypesListOptionalParams, ApplicationTypesDeleteOptionalParams, ApplicationTypesUpdateOptionalParams, ApplicationTypesCreateOrUpdateOptionalParams, ApplicationTypesGetOptionalParams, } from "./options.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _listSend( context: Client, @@ -109,13 +105,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/options.ts index d7bb9a63a4fe..5df9d15d96b8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applicationTypes/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ApplicationTypesListOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts index c8f865edb5a0..75f9ab47183b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/index.ts @@ -2,6 +2,7 @@ // Licensed under the MIT License. export { + updateUpgrade, startRollback, resumeUpgrade, readUpgrade, @@ -12,6 +13,7 @@ export { get, } from "./operations.js"; export { + ApplicationsUpdateUpgradeOptionalParams, ApplicationsStartRollbackOptionalParams, ApplicationsResumeUpgradeOptionalParams, ApplicationsReadUpgradeOptionalParams, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/operations.ts index a11d2b230897..c37da09fdb3e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/operations.ts @@ -1,20 +1,29 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + ApplicationResource, + ApplicationUpdateParameters, + _ApplicationResourceList, + RuntimeResumeApplicationUpgradeParameters, + RuntimeUpdateApplicationUpgradeParameters, +} from "../../models/models.js"; import { errorResponseDeserializer, - ApplicationResource, applicationResourceSerializer, applicationResourceDeserializer, - ApplicationUpdateParameters, applicationUpdateParametersSerializer, - _ApplicationResourceList, _applicationResourceListDeserializer, - RuntimeResumeApplicationUpgradeParameters, runtimeResumeApplicationUpgradeParametersSerializer, + runtimeUpdateApplicationUpgradeParametersSerializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { + ApplicationsUpdateUpgradeOptionalParams, ApplicationsStartRollbackOptionalParams, ApplicationsResumeUpgradeOptionalParams, ApplicationsReadUpgradeOptionalParams, @@ -24,29 +33,20 @@ import { ApplicationsCreateOrUpdateOptionalParams, ApplicationsGetOptionalParams, } from "./options.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; -export function _startRollbackSend( +export function _updateUpgradeSend( context: Client, resourceGroupName: string, clusterName: string, applicationName: string, - options: ApplicationsStartRollbackOptionalParams = { requestOptions: {} }, + parameters: RuntimeUpdateApplicationUpgradeParameters, + options: ApplicationsUpdateUpgradeOptionalParams = { requestOptions: {} }, ): StreamableMethod { const path = expandUrlTemplate( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback{?api%2Dversion}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/updateUpgrade{?api%2Dversion}", { subscriptionId: context.subscriptionId, resourceGroupName: resourceGroupName, @@ -60,13 +60,70 @@ export function _startRollbackSend( ); return context.path(path).post({ ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, + contentType: "application/json", + body: runtimeUpdateApplicationUpgradeParametersSerializer(parameters), }); } +export async function _updateUpgradeDeserialize(result: PathUncheckedResponse): Promise { + const expectedStatuses = ["202", "200"]; + if (!expectedStatuses.includes(result.status)) { + const error = createRestError(result); + error.details = errorResponseDeserializer(result.body); + throw error; + } + + return; +} + +/** Send a request to update the current application upgrade. */ +export function updateUpgrade( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeUpdateApplicationUpgradeParameters, + options: ApplicationsUpdateUpgradeOptionalParams = { requestOptions: {} }, +): PollerLike, void> { + return getLongRunningPoller(context, _updateUpgradeDeserialize, ["202", "200"], { + updateIntervalInMs: options?.updateIntervalInMs, + abortSignal: options?.abortSignal, + getInitialResponse: () => + _updateUpgradeSend( + context, + resourceGroupName, + clusterName, + applicationName, + parameters, + options, + ), + resourceLocationConfig: "location", + }) as PollerLike, void>; +} + +export function _startRollbackSend( + context: Client, + resourceGroupName: string, + clusterName: string, + applicationName: string, + options: ApplicationsStartRollbackOptionalParams = { requestOptions: {} }, +): StreamableMethod { + const path = expandUrlTemplate( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback{?api%2Dversion}", + { + subscriptionId: context.subscriptionId, + resourceGroupName: resourceGroupName, + clusterName: clusterName, + applicationName: applicationName, + "api%2Dversion": context.apiVersion, + }, + { + allowReserved: options?.requestOptions?.skipUrlEncoding, + }, + ); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); +} + export async function _startRollbackDeserialize(result: PathUncheckedResponse): Promise { const expectedStatuses = ["202", "200"]; if (!expectedStatuses.includes(result.status)) { @@ -119,10 +176,6 @@ export function _resumeUpgradeSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: runtimeResumeApplicationUpgradeParametersSerializer(parameters), }); } @@ -183,13 +236,7 @@ export function _readUpgradeSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).post({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); } export async function _readUpgradeDeserialize(result: PathUncheckedResponse): Promise { @@ -296,13 +343,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/options.ts index 4e54ba1372b6..4c1c47ae6e3d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/applications/options.ts @@ -1,7 +1,13 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; + +/** Optional parameters. */ +export interface ApplicationsUpdateUpgradeOptionalParams extends OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; +} /** Optional parameters. */ export interface ApplicationsStartRollbackOptionalParams extends OperationOptions { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/operations.ts index 40e3ca0add91..bc274a2f0f27 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/operations.ts @@ -1,16 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; import { errorResponseDeserializer } from "../../models/models.js"; -import { ManagedApplyMaintenanceWindowPostOptionalParams } from "./options.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { ManagedApplyMaintenanceWindowPostOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _postSend( context: Client, @@ -32,13 +28,7 @@ export function _postSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).post({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).post({ ...operationOptionsToRequestParameters(options) }); } export async function _postDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/options.ts index 2061fcea80c0..04ce1eadafe3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedApplyMaintenanceWindow/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ManagedApplyMaintenanceWindowPostOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/operations.ts index e373008c5250..ee83fece9ba4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/operations.ts @@ -1,20 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ManagedAzResiliencyStatus } from "../../models/models.js"; import { errorResponseDeserializer, - ManagedAzResiliencyStatus, managedAzResiliencyStatusDeserializer, } from "../../models/models.js"; -import { ManagedAzResiliencyStatusGetOptionalParams } from "./options.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { ManagedAzResiliencyStatusGetOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _getSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/options.ts index 8e24b5d8c10e..6228bfa9c458 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedAzResiliencyStatus/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ManagedAzResiliencyStatusGetOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/operations.ts index ad47a5d34f5d..43e21edb3d52 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/operations.ts @@ -1,27 +1,25 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + ManagedClusterCodeVersionResult, + ManagedClusterVersionEnvironment, +} from "../../models/models.js"; import { errorResponseDeserializer, - ManagedClusterCodeVersionResult, managedClusterCodeVersionResultDeserializer, - ManagedClusterVersionEnvironment, managedClusterCodeVersionResultArrayDeserializer, } from "../../models/models.js"; -import { +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { ManagedClusterVersionListByEnvironmentOptionalParams, ManagedClusterVersionGetByEnvironmentOptionalParams, ManagedClusterVersionListOptionalParams, ManagedClusterVersionGetOptionalParams, } from "./options.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listByEnvironmentSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/options.ts index cde36fb227b0..f8c67e6ed10b 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusterVersion/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ManagedClusterVersionListByEnvironmentOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/operations.ts index b32a12088511..44ecdb82dfee 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/operations.ts @@ -1,26 +1,32 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + ManagedCluster, + ManagedClusterUpdateParameters, + _ManagedClusterListResult, + FaultSimulationIdContent, + FaultSimulation, + _FaultSimulationListResult, + FaultSimulationContentWrapper, +} from "../../models/models.js"; import { errorResponseDeserializer, - ManagedCluster, managedClusterSerializer, managedClusterDeserializer, - ManagedClusterUpdateParameters, managedClusterUpdateParametersSerializer, - _ManagedClusterListResult, _managedClusterListResultDeserializer, - FaultSimulationIdContent, faultSimulationIdContentSerializer, - FaultSimulation, faultSimulationDeserializer, - _FaultSimulationListResult, _faultSimulationListResultDeserializer, - FaultSimulationContentWrapper, faultSimulationContentWrapperSerializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { ManagedClustersStopFaultSimulationOptionalParams, ManagedClustersStartFaultSimulationOptionalParams, ManagedClustersListFaultSimulationOptionalParams, @@ -32,19 +38,9 @@ import { ManagedClustersCreateOrUpdateOptionalParams, ManagedClustersGetOptionalParams, } from "./options.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _stopFaultSimulationSend( context: Client, @@ -70,10 +66,6 @@ export function _stopFaultSimulationSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: faultSimulationIdContentSerializer(parameters), }); } @@ -134,10 +126,6 @@ export function _startFaultSimulationSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: faultSimulationContentWrapperSerializer(parameters), }); } @@ -428,13 +416,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/options.ts index 8e8241d19de9..31e5735af036 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedClusters/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ManagedClustersStopFaultSimulationOptionalParams extends OperationOptions { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/operations.ts index 5c770267ffac..0844f7949e5a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/operations.ts @@ -1,20 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ManagedMaintenanceWindowStatus } from "../../models/models.js"; import { errorResponseDeserializer, - ManagedMaintenanceWindowStatus, managedMaintenanceWindowStatusDeserializer, } from "../../models/models.js"; -import { ManagedMaintenanceWindowStatusGetOptionalParams } from "./options.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { ManagedMaintenanceWindowStatusGetOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _getSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/options.ts index fbcb68281758..223eb677fe3e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedMaintenanceWindowStatus/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ManagedMaintenanceWindowStatusGetOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/operations.ts index a54932f74fa3..db0bced6a8f1 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/operations.ts @@ -1,29 +1,22 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ManagedVMSize, _ManagedVMSizesResult } from "../../models/models.js"; import { errorResponseDeserializer, - ManagedVMSize, managedVMSizeDeserializer, - _ManagedVMSizesResult, _managedVMSizesResultDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { ManagedUnsupportedVMSizesListOptionalParams, ManagedUnsupportedVMSizesGetOptionalParams, } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/options.ts index 2ecd2eb954ef..52519a9a85ff 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/managedUnsupportedVMSizes/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ManagedUnsupportedVMSizesListOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/operations.ts index df11897beced..a3646ca084a8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/operations.ts @@ -1,25 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { _NodeTypeListSkuResult, NodeTypeAvailableSku } from "../../models/models.js"; import { errorResponseDeserializer, - _NodeTypeListSkuResult, _nodeTypeListSkuResultDeserializer, - NodeTypeAvailableSku, } from "../../models/models.js"; -import { NodeTypeSkusListOptionalParams } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { NodeTypeSkusListOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/options.ts index a9161f4e0524..0b5f8ced7340 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypeSkus/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface NodeTypeSkusListOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/operations.ts index 02091b6f61f3..feedfac5bf9a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/operations.ts @@ -1,28 +1,34 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + FaultSimulationIdContent, + FaultSimulation, + _FaultSimulationListResult, + FaultSimulationContentWrapper, + NodeType, + NodeTypeUpdateParameters, + _NodeTypeListResult, + NodeTypeActionParameters, +} from "../../models/models.js"; import { errorResponseDeserializer, - FaultSimulationIdContent, faultSimulationIdContentSerializer, - FaultSimulation, faultSimulationDeserializer, - _FaultSimulationListResult, _faultSimulationListResultDeserializer, - FaultSimulationContentWrapper, faultSimulationContentWrapperSerializer, - NodeType, nodeTypeSerializer, nodeTypeDeserializer, - NodeTypeUpdateParameters, nodeTypeUpdateParametersSerializer, - _NodeTypeListResult, _nodeTypeListResultDeserializer, - NodeTypeActionParameters, nodeTypeActionParametersSerializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { NodeTypesListFaultSimulationOptionalParams, NodeTypesGetFaultSimulationOptionalParams, NodeTypesStopFaultSimulationOptionalParams, @@ -39,19 +45,9 @@ import { NodeTypesCreateOrUpdateOptionalParams, NodeTypesGetOptionalParams, } from "./options.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _listFaultSimulationSend( context: Client, @@ -201,10 +197,6 @@ export function _stopFaultSimulationSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: faultSimulationIdContentSerializer(parameters), }); } @@ -271,10 +263,6 @@ export function _startFaultSimulationSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: faultSimulationContentWrapperSerializer(parameters), }); } @@ -341,10 +329,6 @@ export function _startSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: nodeTypeActionParametersSerializer(parameters), }); } @@ -402,10 +386,6 @@ export function _restartSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: nodeTypeActionParametersSerializer(parameters), }); } @@ -463,10 +443,6 @@ export function _reimageSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: nodeTypeActionParametersSerializer(parameters), }); } @@ -524,10 +500,6 @@ export function _redeploySend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: nodeTypeActionParametersSerializer(parameters), }); } @@ -585,10 +557,6 @@ export function _deleteNodeSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: nodeTypeActionParametersSerializer(parameters), }); } @@ -646,10 +614,6 @@ export function _deallocateSend( return context.path(path).post({ ...operationOptionsToRequestParameters(options), contentType: "application/json", - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, body: nodeTypeActionParametersSerializer(parameters), }); } @@ -763,13 +727,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/options.ts index adb42eeef9c6..22ea73ebe3ae 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/nodeTypes/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface NodeTypesListFaultSimulationOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/operations.ts index 4a96e7b29275..691c85f47346 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/operations.ts @@ -1,16 +1,12 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; import { errorResponseDeserializer } from "../../models/models.js"; -import { OperationResultsGetOptionalParams } from "./options.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { OperationResultsGetOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _getSend( context: Client, @@ -30,13 +26,7 @@ export function _getSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).get({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).get({ ...operationOptionsToRequestParameters(options) }); } export async function _getDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/options.ts index 5c7875ec5446..fb5eabce6b1a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationResults/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface OperationResultsGetOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/operations.ts index 1d7490351e8c..a64319e1ea7a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/operations.ts @@ -1,20 +1,16 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { LongRunningOperationResult } from "../../models/models.js"; import { errorResponseDeserializer, - LongRunningOperationResult, longRunningOperationResultDeserializer, } from "../../models/models.js"; -import { OperationStatusGetOptionalParams } from "./options.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { OperationStatusGetOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _getSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/options.ts index 00cfd502d57b..56a8e6fe5f3d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operationStatus/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface OperationStatusGetOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/operations.ts index b5123ca0af7c..3acbeda3d537 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/operations.ts @@ -1,25 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { _OperationListResult, OperationResult } from "../../models/models.js"; import { - _OperationListResult, _operationListResultDeserializer, - OperationResult, errorResponseDeserializer, } from "../../models/models.js"; -import { OperationsListOptionalParams } from "./options.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; +import type { OperationsListOptionalParams } from "./options.js"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; export function _listSend( context: Client, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/options.ts index c461016ad1c5..b9a3fd9758a3 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/operations/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface OperationsListOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricManagedClustersManagementContext.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricManagedClustersManagementContext.ts index 5a7d4449be8e..e6c05a8e9997 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricManagedClustersManagementContext.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/serviceFabricManagedClustersManagementContext.ts @@ -3,8 +3,11 @@ import { logger } from "../logger.js"; import { KnownVersions } from "../models/models.js"; -import { Client, ClientOptions, getClient } from "@azure-rest/core-client"; -import { TokenCredential } from "@azure/core-auth"; +import type { AzureSupportedClouds } from "../static-helpers/cloudSettingHelpers.js"; +import { getArmEndpoint } from "../static-helpers/cloudSettingHelpers.js"; +import type { Client, ClientOptions } from "@azure-rest/core-client"; +import { getClient } from "@azure-rest/core-client"; +import type { TokenCredential } from "@azure/core-auth"; /** Service Fabric Managed Clusters Management Client */ export interface ServiceFabricManagedClustersManagementContext extends Client { @@ -20,6 +23,8 @@ export interface ServiceFabricManagedClustersManagementClientOptionalParams exte /** The API version to use for this operation. */ /** Known values of {@link KnownVersions} that the service accepts. */ apiVersion?: string; + /** Specifies the Azure cloud environment for the client. */ + cloudSetting?: AzureSupportedClouds; } /** Service Fabric Managed Clusters Management Client */ @@ -28,7 +33,8 @@ export function createServiceFabricManagedClustersManagement( subscriptionId: string, options: ServiceFabricManagedClustersManagementClientOptionalParams = {}, ): ServiceFabricManagedClustersManagementContext { - const endpointUrl = options.endpoint ?? options.baseUrl ?? "https://management.azure.com"; + const endpointUrl = + options.endpoint ?? getArmEndpoint(options.cloudSetting) ?? "https://management.azure.com"; const prefixFromOptions = options?.userAgentOptions?.userAgentPrefix; const userAgentInfo = `azsdk-js-arm-servicefabricmanagedclusters/1.0.0-beta.1`; const userAgentPrefix = prefixFromOptions @@ -44,7 +50,7 @@ export function createServiceFabricManagedClustersManagement( }; const clientContext = getClient(endpointUrl, credential, updatedOptions); clientContext.pipeline.removePolicy({ name: "ApiVersionPolicy" }); - const apiVersion = options.apiVersion ?? "2025-03-01-preview"; + const apiVersion = options.apiVersion ?? "2025-06-01-preview"; clientContext.pipeline.addPolicy({ name: "ClientApiVersionPolicy", sendRequest: (req, next) => { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/operations.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/operations.ts index 1fb9ae9a55b5..017d78b3b44a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/operations.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/operations.ts @@ -1,37 +1,33 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { ServiceFabricManagedClustersManagementContext as Client } from "../index.js"; +import type { + ServiceResource, + ServiceUpdateParameters, + _ServiceResourceList, +} from "../../models/models.js"; import { errorResponseDeserializer, - ServiceResource, serviceResourceSerializer, serviceResourceDeserializer, - ServiceUpdateParameters, serviceUpdateParametersSerializer, - _ServiceResourceList, _serviceResourceListDeserializer, } from "../../models/models.js"; -import { +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import { buildPagedAsyncIterator } from "../../static-helpers/pagingHelpers.js"; +import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; +import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; +import type { ServicesListByApplicationsOptionalParams, ServicesDeleteOptionalParams, ServicesUpdateOptionalParams, ServicesCreateOrUpdateOptionalParams, ServicesGetOptionalParams, } from "./options.js"; -import { getLongRunningPoller } from "../../static-helpers/pollingHelpers.js"; -import { - PagedAsyncIterableIterator, - buildPagedAsyncIterator, -} from "../../static-helpers/pagingHelpers.js"; -import { expandUrlTemplate } from "../../static-helpers/urlTemplate.js"; -import { - StreamableMethod, - PathUncheckedResponse, - createRestError, - operationOptionsToRequestParameters, -} from "@azure-rest/core-client"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { StreamableMethod, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError, operationOptionsToRequestParameters } from "@azure-rest/core-client"; +import type { PollerLike, OperationState } from "@azure/core-lro"; export function _listByApplicationsSend( context: Client, @@ -115,13 +111,7 @@ export function _$deleteSend( allowReserved: options?.requestOptions?.skipUrlEncoding, }, ); - return context.path(path).delete({ - ...operationOptionsToRequestParameters(options), - headers: { - accept: "application/json", - ...options.requestOptions?.headers, - }, - }); + return context.path(path).delete({ ...operationOptionsToRequestParameters(options) }); } export async function _$deleteDeserialize(result: PathUncheckedResponse): Promise { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/options.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/options.ts index cd8906d11486..029edf92719e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/options.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/api/services/options.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { OperationOptions } from "@azure-rest/core-client"; +import type { OperationOptions } from "@azure-rest/core-client"; /** Optional parameters. */ export interface ServicesListByApplicationsOptionalParams extends OperationOptions {} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts index 826e505587e7..8cf141777ad2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypeVersions/index.ts @@ -1,18 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { - ApplicationTypeVersionResource, - ApplicationTypeVersionUpdateParameters, -} from "../../models/models.js"; -import { - ApplicationTypeVersionsListByApplicationTypesOptionalParams, - ApplicationTypeVersionsDeleteOptionalParams, - ApplicationTypeVersionsUpdateOptionalParams, - ApplicationTypeVersionsCreateOrUpdateOptionalParams, - ApplicationTypeVersionsGetOptionalParams, -} from "../../api/applicationTypeVersions/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { listByApplicationTypes, $delete, @@ -20,8 +9,19 @@ import { createOrUpdate, get, } from "../../api/applicationTypeVersions/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + ApplicationTypeVersionsListByApplicationTypesOptionalParams, + ApplicationTypeVersionsDeleteOptionalParams, + ApplicationTypeVersionsUpdateOptionalParams, + ApplicationTypeVersionsCreateOrUpdateOptionalParams, + ApplicationTypeVersionsGetOptionalParams, +} from "../../api/applicationTypeVersions/options.js"; +import type { + ApplicationTypeVersionResource, + ApplicationTypeVersionUpdateParameters, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a ApplicationTypeVersions operations. */ export interface ApplicationTypeVersionsOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts index aec024df03b8..934d4389d767 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applicationTypes/index.ts @@ -1,15 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { ApplicationTypeResource, ApplicationTypeUpdateParameters } from "../../models/models.js"; -import { - ApplicationTypesListOptionalParams, - ApplicationTypesDeleteOptionalParams, - ApplicationTypesUpdateOptionalParams, - ApplicationTypesCreateOrUpdateOptionalParams, - ApplicationTypesGetOptionalParams, -} from "../../api/applicationTypes/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { list, $delete, @@ -17,8 +9,19 @@ import { createOrUpdate, get, } from "../../api/applicationTypes/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + ApplicationTypesListOptionalParams, + ApplicationTypesDeleteOptionalParams, + ApplicationTypesUpdateOptionalParams, + ApplicationTypesCreateOrUpdateOptionalParams, + ApplicationTypesGetOptionalParams, +} from "../../api/applicationTypes/options.js"; +import type { + ApplicationTypeResource, + ApplicationTypeUpdateParameters, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a ApplicationTypes operations. */ export interface ApplicationTypesOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts index 3d4b4e69ef62..356cdbf5507a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/applications/index.ts @@ -1,23 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { - ApplicationResource, - ApplicationUpdateParameters, - RuntimeResumeApplicationUpgradeParameters, -} from "../../models/models.js"; -import { - ApplicationsStartRollbackOptionalParams, - ApplicationsResumeUpgradeOptionalParams, - ApplicationsReadUpgradeOptionalParams, - ApplicationsListOptionalParams, - ApplicationsDeleteOptionalParams, - ApplicationsUpdateOptionalParams, - ApplicationsCreateOrUpdateOptionalParams, - ApplicationsGetOptionalParams, -} from "../../api/applications/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { + updateUpgrade, startRollback, resumeUpgrade, readUpgrade, @@ -27,11 +13,36 @@ import { createOrUpdate, get, } from "../../api/applications/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + ApplicationsUpdateUpgradeOptionalParams, + ApplicationsStartRollbackOptionalParams, + ApplicationsResumeUpgradeOptionalParams, + ApplicationsReadUpgradeOptionalParams, + ApplicationsListOptionalParams, + ApplicationsDeleteOptionalParams, + ApplicationsUpdateOptionalParams, + ApplicationsCreateOrUpdateOptionalParams, + ApplicationsGetOptionalParams, +} from "../../api/applications/options.js"; +import type { + ApplicationResource, + ApplicationUpdateParameters, + RuntimeResumeApplicationUpgradeParameters, + RuntimeUpdateApplicationUpgradeParameters, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a Applications operations. */ export interface ApplicationsOperations { + /** Send a request to update the current application upgrade. */ + updateUpgrade: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeUpdateApplicationUpgradeParameters, + options?: ApplicationsUpdateUpgradeOptionalParams, + ) => PollerLike, void>; /** Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. */ startRollback: ( resourceGroupName: string, @@ -99,6 +110,14 @@ export interface ApplicationsOperations { function _getApplications(context: ServiceFabricManagedClustersManagementContext) { return { + updateUpgrade: ( + resourceGroupName: string, + clusterName: string, + applicationName: string, + parameters: RuntimeUpdateApplicationUpgradeParameters, + options?: ApplicationsUpdateUpgradeOptionalParams, + ) => + updateUpgrade(context, resourceGroupName, clusterName, applicationName, parameters, options), startRollback: ( resourceGroupName: string, clusterName: string, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedApplyMaintenanceWindow/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedApplyMaintenanceWindow/index.ts index 3f020d76ab62..49cef0a22ef5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedApplyMaintenanceWindow/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedApplyMaintenanceWindow/index.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { ManagedApplyMaintenanceWindowPostOptionalParams } from "../../api/managedApplyMaintenanceWindow/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { post } from "../../api/managedApplyMaintenanceWindow/operations.js"; +import type { ManagedApplyMaintenanceWindowPostOptionalParams } from "../../api/managedApplyMaintenanceWindow/options.js"; /** Interface representing a ManagedApplyMaintenanceWindow operations. */ export interface ManagedApplyMaintenanceWindowOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedAzResiliencyStatus/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedAzResiliencyStatus/index.ts index 52d97bd576b6..a0298d8ccde9 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedAzResiliencyStatus/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedAzResiliencyStatus/index.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { ManagedAzResiliencyStatus } from "../../models/models.js"; -import { ManagedAzResiliencyStatusGetOptionalParams } from "../../api/managedAzResiliencyStatus/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { get } from "../../api/managedAzResiliencyStatus/operations.js"; +import type { ManagedAzResiliencyStatusGetOptionalParams } from "../../api/managedAzResiliencyStatus/options.js"; +import type { ManagedAzResiliencyStatus } from "../../models/models.js"; /** Interface representing a ManagedAzResiliencyStatus operations. */ export interface ManagedAzResiliencyStatusOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts index 8e03f9bf67ac..29b4d5b27126 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusterVersion/index.ts @@ -1,23 +1,23 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { - ManagedClusterCodeVersionResult, - ManagedClusterVersionEnvironment, -} from "../../models/models.js"; -import { - ManagedClusterVersionListByEnvironmentOptionalParams, - ManagedClusterVersionGetByEnvironmentOptionalParams, - ManagedClusterVersionListOptionalParams, - ManagedClusterVersionGetOptionalParams, -} from "../../api/managedClusterVersion/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { listByEnvironment, getByEnvironment, list, get, } from "../../api/managedClusterVersion/operations.js"; +import type { + ManagedClusterVersionListByEnvironmentOptionalParams, + ManagedClusterVersionGetByEnvironmentOptionalParams, + ManagedClusterVersionListOptionalParams, + ManagedClusterVersionGetOptionalParams, +} from "../../api/managedClusterVersion/options.js"; +import type { + ManagedClusterCodeVersionResult, + ManagedClusterVersionEnvironment, +} from "../../models/models.js"; /** Interface representing a ManagedClusterVersion operations. */ export interface ManagedClusterVersionOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts index 7d14117b1b7d..42d0d9a69ad8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedClusters/index.ts @@ -1,26 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { - ManagedCluster, - ManagedClusterUpdateParameters, - FaultSimulationIdContent, - FaultSimulation, - FaultSimulationContentWrapper, -} from "../../models/models.js"; -import { - ManagedClustersStopFaultSimulationOptionalParams, - ManagedClustersStartFaultSimulationOptionalParams, - ManagedClustersListFaultSimulationOptionalParams, - ManagedClustersGetFaultSimulationOptionalParams, - ManagedClustersListBySubscriptionOptionalParams, - ManagedClustersListByResourceGroupOptionalParams, - ManagedClustersDeleteOptionalParams, - ManagedClustersUpdateOptionalParams, - ManagedClustersCreateOrUpdateOptionalParams, - ManagedClustersGetOptionalParams, -} from "../../api/managedClusters/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { stopFaultSimulation, startFaultSimulation, @@ -33,8 +14,27 @@ import { createOrUpdate, get, } from "../../api/managedClusters/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + ManagedClustersStopFaultSimulationOptionalParams, + ManagedClustersStartFaultSimulationOptionalParams, + ManagedClustersListFaultSimulationOptionalParams, + ManagedClustersGetFaultSimulationOptionalParams, + ManagedClustersListBySubscriptionOptionalParams, + ManagedClustersListByResourceGroupOptionalParams, + ManagedClustersDeleteOptionalParams, + ManagedClustersUpdateOptionalParams, + ManagedClustersCreateOrUpdateOptionalParams, + ManagedClustersGetOptionalParams, +} from "../../api/managedClusters/options.js"; +import type { + ManagedCluster, + ManagedClusterUpdateParameters, + FaultSimulationIdContent, + FaultSimulation, + FaultSimulationContentWrapper, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a ManagedClusters operations. */ export interface ManagedClustersOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedMaintenanceWindowStatus/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedMaintenanceWindowStatus/index.ts index 4c7b90113154..cd526539e3b6 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedMaintenanceWindowStatus/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedMaintenanceWindowStatus/index.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { ManagedMaintenanceWindowStatus } from "../../models/models.js"; -import { ManagedMaintenanceWindowStatusGetOptionalParams } from "../../api/managedMaintenanceWindowStatus/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { get } from "../../api/managedMaintenanceWindowStatus/operations.js"; +import type { ManagedMaintenanceWindowStatusGetOptionalParams } from "../../api/managedMaintenanceWindowStatus/options.js"; +import type { ManagedMaintenanceWindowStatus } from "../../models/models.js"; /** Interface representing a ManagedMaintenanceWindowStatus operations. */ export interface ManagedMaintenanceWindowStatusOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedUnsupportedVMSizes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedUnsupportedVMSizes/index.ts index fde83ba98d2d..f174a8415748 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedUnsupportedVMSizes/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/managedUnsupportedVMSizes/index.ts @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { ManagedVMSize } from "../../models/models.js"; -import { +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; +import { list, get } from "../../api/managedUnsupportedVMSizes/operations.js"; +import type { ManagedUnsupportedVMSizesListOptionalParams, ManagedUnsupportedVMSizesGetOptionalParams, } from "../../api/managedUnsupportedVMSizes/options.js"; -import { list, get } from "../../api/managedUnsupportedVMSizes/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { ManagedVMSize } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a ManagedUnsupportedVMSizes operations. */ export interface ManagedUnsupportedVMSizesOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypeSkus/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypeSkus/index.ts index 0c89db6e1689..2d21b07194d2 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypeSkus/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypeSkus/index.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { NodeTypeAvailableSku } from "../../models/models.js"; -import { NodeTypeSkusListOptionalParams } from "../../api/nodeTypeSkus/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { list } from "../../api/nodeTypeSkus/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { NodeTypeSkusListOptionalParams } from "../../api/nodeTypeSkus/options.js"; +import type { NodeTypeAvailableSku } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a NodeTypeSkus operations. */ export interface NodeTypeSkusOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts index d3f2d92c59ad..28f28a4b8ce8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/nodeTypes/index.ts @@ -1,32 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { - FaultSimulationIdContent, - FaultSimulation, - FaultSimulationContentWrapper, - NodeType, - NodeTypeUpdateParameters, - NodeTypeActionParameters, -} from "../../models/models.js"; -import { - NodeTypesListFaultSimulationOptionalParams, - NodeTypesGetFaultSimulationOptionalParams, - NodeTypesStopFaultSimulationOptionalParams, - NodeTypesStartFaultSimulationOptionalParams, - NodeTypesStartOptionalParams, - NodeTypesRestartOptionalParams, - NodeTypesReimageOptionalParams, - NodeTypesRedeployOptionalParams, - NodeTypesDeleteNodeOptionalParams, - NodeTypesDeallocateOptionalParams, - NodeTypesListByManagedClustersOptionalParams, - NodeTypesDeleteOptionalParams, - NodeTypesUpdateOptionalParams, - NodeTypesCreateOrUpdateOptionalParams, - NodeTypesGetOptionalParams, -} from "../../api/nodeTypes/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { listFaultSimulation, getFaultSimulation, @@ -44,8 +19,33 @@ import { createOrUpdate, get, } from "../../api/nodeTypes/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + NodeTypesListFaultSimulationOptionalParams, + NodeTypesGetFaultSimulationOptionalParams, + NodeTypesStopFaultSimulationOptionalParams, + NodeTypesStartFaultSimulationOptionalParams, + NodeTypesStartOptionalParams, + NodeTypesRestartOptionalParams, + NodeTypesReimageOptionalParams, + NodeTypesRedeployOptionalParams, + NodeTypesDeleteNodeOptionalParams, + NodeTypesDeallocateOptionalParams, + NodeTypesListByManagedClustersOptionalParams, + NodeTypesDeleteOptionalParams, + NodeTypesUpdateOptionalParams, + NodeTypesCreateOrUpdateOptionalParams, + NodeTypesGetOptionalParams, +} from "../../api/nodeTypes/options.js"; +import type { + FaultSimulationIdContent, + FaultSimulation, + FaultSimulationContentWrapper, + NodeType, + NodeTypeUpdateParameters, + NodeTypeActionParameters, +} from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a NodeTypes operations. */ export interface NodeTypesOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts index d4a04e745946..5a78dc6e9898 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationResults/index.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { OperationResultsGetOptionalParams } from "../../api/operationResults/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { get } from "../../api/operationResults/operations.js"; +import type { OperationResultsGetOptionalParams } from "../../api/operationResults/options.js"; /** Interface representing a OperationResults operations. */ export interface OperationResultsOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts index 6839ed9228eb..40670e506b00 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operationStatus/index.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { LongRunningOperationResult } from "../../models/models.js"; -import { OperationStatusGetOptionalParams } from "../../api/operationStatus/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { get } from "../../api/operationStatus/operations.js"; +import type { OperationStatusGetOptionalParams } from "../../api/operationStatus/options.js"; +import type { LongRunningOperationResult } from "../../models/models.js"; /** Interface representing a OperationStatus operations. */ export interface OperationStatusOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts index 2134e1d9f2bc..bcaaab6248f8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/operations/index.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { OperationResult } from "../../models/models.js"; -import { OperationsListOptionalParams } from "../../api/operations/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { list } from "../../api/operations/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { OperationsListOptionalParams } from "../../api/operations/options.js"; +import type { OperationResult } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; /** Interface representing a Operations operations. */ export interface OperationsOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts index 18aa88cbbb08..c3a8ce58411d 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/classic/services/index.ts @@ -1,15 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; -import { ServiceResource, ServiceUpdateParameters } from "../../models/models.js"; -import { - ServicesListByApplicationsOptionalParams, - ServicesDeleteOptionalParams, - ServicesUpdateOptionalParams, - ServicesCreateOrUpdateOptionalParams, - ServicesGetOptionalParams, -} from "../../api/services/options.js"; +import type { ServiceFabricManagedClustersManagementContext } from "../../api/serviceFabricManagedClustersManagementContext.js"; import { listByApplications, $delete, @@ -17,8 +9,16 @@ import { createOrUpdate, get, } from "../../api/services/operations.js"; -import { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; -import { PollerLike, OperationState } from "@azure/core-lro"; +import type { + ServicesListByApplicationsOptionalParams, + ServicesDeleteOptionalParams, + ServicesUpdateOptionalParams, + ServicesCreateOrUpdateOptionalParams, + ServicesGetOptionalParams, +} from "../../api/services/options.js"; +import type { ServiceResource, ServiceUpdateParameters } from "../../models/models.js"; +import type { PagedAsyncIterableIterator } from "../../static-helpers/pagingHelpers.js"; +import type { PollerLike, OperationState } from "@azure/core-lro"; /** Interface representing a Services operations. */ export interface ServicesOperations { diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts index 214f8df11405..7b1da30929df 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/index.ts @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. +import { AzureClouds, AzureSupportedClouds } from "./static-helpers/cloudSettingHelpers.js"; import { PageSettings, ContinuablePage, @@ -36,6 +37,16 @@ export { CreatedByType, ApplicationUpdateParameters, RuntimeResumeApplicationUpgradeParameters, + RuntimeUpdateApplicationUpgradeParameters, + KnownRuntimeUpgradeKind, + RuntimeUpgradeKind, + RuntimeApplicationHealthPolicy, + RuntimeServiceTypeHealthPolicy, + RuntimeRollingUpgradeUpdateMonitoringPolicy, + KnownRuntimeRollingUpgradeMode, + RuntimeRollingUpgradeMode, + KnownRuntimeFailureAction, + RuntimeFailureAction, ApplicationTypeResource, ApplicationTypeResourceProperties, ApplicationTypeUpdateParameters, @@ -216,6 +227,7 @@ export { } from "./models/index.js"; export { ServiceFabricManagedClustersManagementClientOptionalParams } from "./api/index.js"; export { + ApplicationsUpdateUpgradeOptionalParams, ApplicationsStartRollbackOptionalParams, ApplicationsResumeUpgradeOptionalParams, ApplicationsReadUpgradeOptionalParams, @@ -310,3 +322,4 @@ export { ServicesOperations, } from "./classic/index.js"; export { PageSettings, ContinuablePage, PagedAsyncIterableIterator }; +export { AzureClouds, AzureSupportedClouds }; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts index 430e7a951d1f..de28df0dbc3f 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/index.ts @@ -28,6 +28,16 @@ export { CreatedByType, ApplicationUpdateParameters, RuntimeResumeApplicationUpgradeParameters, + RuntimeUpdateApplicationUpgradeParameters, + KnownRuntimeUpgradeKind, + RuntimeUpgradeKind, + RuntimeApplicationHealthPolicy, + RuntimeServiceTypeHealthPolicy, + RuntimeRollingUpgradeUpdateMonitoringPolicy, + KnownRuntimeRollingUpgradeMode, + RuntimeRollingUpgradeMode, + KnownRuntimeFailureAction, + RuntimeFailureAction, ApplicationTypeResource, ApplicationTypeResourceProperties, ApplicationTypeUpdateParameters, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts index 370a7db54996..33766160e16a 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/models/models.ts @@ -481,9 +481,9 @@ export type FailureAction = string; /** The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. */ export enum KnownRollingUpgradeMode { - /** The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0. */ + /** The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. */ Monitored = "Monitored", - /** The upgrade will proceed automatically without performing any health monitoring. The value is 1. */ + /** The upgrade will proceed automatically without performing any health monitoring. */ UnmonitoredAuto = "UnmonitoredAuto", } @@ -492,8 +492,8 @@ export enum KnownRollingUpgradeMode { * {@link KnownRollingUpgradeMode} can be used interchangeably with RollingUpgradeMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Monitored**: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 0. \ - * **UnmonitoredAuto**: The upgrade will proceed automatically without performing any health monitoring. The value is 1. + * **Monitored**: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. \ + * **UnmonitoredAuto**: The upgrade will proceed automatically without performing any health monitoring. */ export type RollingUpgradeMode = string; @@ -666,7 +666,7 @@ export enum KnownCreatedByType { /** * The kind of entity that created the resource. \ - * {@link KnowncreatedByType} can be used interchangeably with createdByType, + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **User**: The entity was created by a user. \ @@ -725,6 +725,211 @@ export function runtimeResumeApplicationUpgradeParametersSerializer( return { upgradeDomainName: item["upgradeDomainName"] }; } +/** Parameters for the Update Upgrade action. */ +export interface RuntimeUpdateApplicationUpgradeParameters { + /** The name of the application, including the 'fabric:' URI scheme. */ + name: string; + /** The kind of the upgrade. */ + upgradeKind: RuntimeUpgradeKind; + /** Defines a health policy used to evaluate the health of an application or one of its children entities. */ + applicationHealthPolicy?: RuntimeApplicationHealthPolicy; + /** Describes the parameters for updating a rolling upgrade of application or cluster and a monitoring policy. */ + updateDescription?: RuntimeRollingUpgradeUpdateMonitoringPolicy; +} + +export function runtimeUpdateApplicationUpgradeParametersSerializer( + item: RuntimeUpdateApplicationUpgradeParameters, +): any { + return { + name: item["name"], + upgradeKind: item["upgradeKind"], + applicationHealthPolicy: !item["applicationHealthPolicy"] + ? item["applicationHealthPolicy"] + : runtimeApplicationHealthPolicySerializer(item["applicationHealthPolicy"]), + updateDescription: !item["updateDescription"] + ? item["updateDescription"] + : runtimeRollingUpgradeUpdateMonitoringPolicySerializer(item["updateDescription"]), + }; +} + +/** Cluster level definition for the kind of upgrade. */ +export enum KnownRuntimeUpgradeKind { + /** The upgrade progresses one upgrade domain at a time. */ + Rolling = "Rolling", +} + +/** + * Cluster level definition for the kind of upgrade. \ + * {@link KnownRuntimeUpgradeKind} can be used interchangeably with RuntimeUpgradeKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Rolling**: The upgrade progresses one upgrade domain at a time. + */ +export type RuntimeUpgradeKind = string; + +/** Cluster level definition for a health policy used to evaluate the health of an application or one of its children entities. */ +export interface RuntimeApplicationHealthPolicy { + /** Indicates whether warnings are treated with the same severity as errors. */ + considerWarningAsError: boolean; + /** + * The maximum allowed percentage of unhealthy deployed applications. Allowed values are Byte values from zero to 100. + * The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. + * This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. + * The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. + */ + maxPercentUnhealthyDeployedApplications: number; + /** The health policy used by default to evaluate the health of a service type. */ + defaultServiceTypeHealthPolicy?: RuntimeServiceTypeHealthPolicy; + /** The map with service type health policy per service type name. The map is empty by default. */ + serviceTypeHealthPolicyMap?: Record; +} + +export function runtimeApplicationHealthPolicySerializer( + item: RuntimeApplicationHealthPolicy, +): any { + return { + considerWarningAsError: item["considerWarningAsError"], + maxPercentUnhealthyDeployedApplications: item["maxPercentUnhealthyDeployedApplications"], + defaultServiceTypeHealthPolicy: !item["defaultServiceTypeHealthPolicy"] + ? item["defaultServiceTypeHealthPolicy"] + : runtimeServiceTypeHealthPolicySerializer(item["defaultServiceTypeHealthPolicy"]), + serviceTypeHealthPolicyMap: !item["serviceTypeHealthPolicyMap"] + ? item["serviceTypeHealthPolicyMap"] + : runtimeServiceTypeHealthPolicyRecordSerializer(item["serviceTypeHealthPolicyMap"]), + }; +} + +/** Cluster level definition that represents the health policy used to evaluate the health of services belonging to a service type. */ +export interface RuntimeServiceTypeHealthPolicy { + /** + * The maximum allowed percentage of unhealthy services. + * + * The percentage represents the maximum tolerated percentage of services that can be unhealthy before the application is considered in error. + * If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. + * This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. + * The computation rounds up to tolerate one failure on small numbers of services. + */ + maxPercentUnhealthyServices: number; + /** + * The maximum allowed percentage of unhealthy partitions per service. + * + * The percentage represents the maximum tolerated percentage of partitions that can be unhealthy before the service is considered in error. + * If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. + * The computation rounds up to tolerate one failure on small numbers of partitions. + */ + maxPercentUnhealthyPartitionsPerService: number; + /** + * The maximum allowed percentage of unhealthy replicas per partition. + * + * The percentage represents the maximum tolerated percentage of replicas that can be unhealthy before the partition is considered in error. + * If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. + * The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. + * The computation rounds up to tolerate one failure on small numbers of replicas. + */ + maxPercentUnhealthyReplicasPerPartition: number; +} + +export function runtimeServiceTypeHealthPolicySerializer( + item: RuntimeServiceTypeHealthPolicy, +): any { + return { + maxPercentUnhealthyServices: item["maxPercentUnhealthyServices"], + maxPercentUnhealthyPartitionsPerService: item["maxPercentUnhealthyPartitionsPerService"], + maxPercentUnhealthyReplicasPerPartition: item["maxPercentUnhealthyReplicasPerPartition"], + }; +} + +export function runtimeServiceTypeHealthPolicyRecordSerializer( + item: Record, +): Record { + const result: Record = {}; + Object.keys(item).map((key) => { + result[key] = !item[key] ? item[key] : runtimeServiceTypeHealthPolicySerializer(item[key]); + }); + return result; +} + +/** Describes the parameters for updating a rolling upgrade of application or cluster. */ +export interface RuntimeRollingUpgradeUpdateMonitoringPolicy { + /** The mode used to monitor health during a rolling upgrade. */ + rollingUpgradeMode: RuntimeRollingUpgradeMode; + /** If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). */ + forceRestart?: boolean; + /** The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). */ + replicaSetCheckTimeoutInMilliseconds?: number; + /** The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode */ + failureAction?: RuntimeFailureAction; + /** The amount of time to wait after completing an upgrade domain before applying health policies. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. */ + healthCheckWaitDurationInMilliseconds?: string; + /** The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. */ + healthCheckStableDurationInMilliseconds?: string; + /** The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. */ + healthCheckRetryTimeoutInMilliseconds?: string; + /** The amount of time the overall upgrade has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. */ + upgradeTimeoutInMilliseconds?: string; + /** The amount of time each upgrade domain has to complete before FailureAction is executed. It is first interpreted as a string representing an ISO 8601 duration. If that fails, then it is interpreted as a number representing the total number of milliseconds. */ + upgradeDomainTimeoutInMilliseconds?: string; + /** Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description. */ + instanceCloseDelayDurationInSeconds?: number; +} + +export function runtimeRollingUpgradeUpdateMonitoringPolicySerializer( + item: RuntimeRollingUpgradeUpdateMonitoringPolicy, +): any { + return { + rollingUpgradeMode: item["rollingUpgradeMode"], + forceRestart: item["forceRestart"], + replicaSetCheckTimeoutInMilliseconds: item["replicaSetCheckTimeoutInMilliseconds"], + failureAction: item["failureAction"], + healthCheckWaitDurationInMilliseconds: item["healthCheckWaitDurationInMilliseconds"], + healthCheckStableDurationInMilliseconds: item["healthCheckStableDurationInMilliseconds"], + healthCheckRetryTimeoutInMilliseconds: item["healthCheckRetryTimeoutInMilliseconds"], + upgradeTimeoutInMilliseconds: item["upgradeTimeoutInMilliseconds"], + upgradeDomainTimeoutInMilliseconds: item["upgradeDomainTimeoutInMilliseconds"], + instanceCloseDelayDurationInSeconds: item["instanceCloseDelayDurationInSeconds"], + }; +} + +/** Cluster level definition for the mode used to monitor health during a rolling upgrade. */ +export enum KnownRuntimeRollingUpgradeMode { + /** The upgrade will proceed automatically without performing any health monitoring. */ + UnmonitoredAuto = "UnmonitoredAuto", + /** The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. */ + UnmonitoredManual = "UnmonitoredManual", + /** The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. */ + Monitored = "Monitored", +} + +/** + * Cluster level definition for the mode used to monitor health during a rolling upgrade. \ + * {@link KnownRuntimeRollingUpgradeMode} can be used interchangeably with RuntimeRollingUpgradeMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **UnmonitoredAuto**: The upgrade will proceed automatically without performing any health monitoring. \ + * **UnmonitoredManual**: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. \ + * **Monitored**: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. + */ +export type RuntimeRollingUpgradeMode = string; + +/** Cluster level definition for the compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. */ +export enum KnownRuntimeFailureAction { + /** Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. */ + Rollback = "Rollback", + /** Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. */ + Manual = "Manual", +} + +/** + * Cluster level definition for the compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. \ + * {@link KnownRuntimeFailureAction} can be used interchangeably with RuntimeFailureAction, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Rollback**: Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. \ + * **Manual**: Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. + */ +export type RuntimeFailureAction = string; + /** The application type name resource */ export interface ApplicationTypeResource extends ProxyResource { /** The application type name properties */ @@ -2477,6 +2682,8 @@ export interface ManagedClusterProperties { allocatedOutboundPorts?: number; /** The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. */ vmImage?: string; + /** Enable the creation of node types with only outbound traffic enabled. If set, a separate load balancer backend pool will be created for node types with inbound traffic enabled. Can only be set at the time of cluster creation. */ + enableOutboundOnlyNodeTypes?: boolean; } export function managedClusterPropertiesSerializer(item: ManagedClusterProperties): any { @@ -2538,6 +2745,7 @@ export function managedClusterPropertiesSerializer(item: ManagedClusterPropertie autoGeneratedDomainNameLabelScope: item["autoGeneratedDomainNameLabelScope"], allocatedOutboundPorts: item["allocatedOutboundPorts"], VMImage: item["vmImage"], + enableOutboundOnlyNodeTypes: item["enableOutboundOnlyNodeTypes"], }; } @@ -2613,6 +2821,7 @@ export function managedClusterPropertiesDeserializer(item: any): ManagedClusterP autoGeneratedDomainNameLabelScope: item["autoGeneratedDomainNameLabelScope"], allocatedOutboundPorts: item["allocatedOutboundPorts"], vmImage: item["VMImage"], + enableOutboundOnlyNodeTypes: item["enableOutboundOnlyNodeTypes"], }; } @@ -3316,6 +3525,8 @@ export interface ServiceEndpoint { service: string; /** A list of locations. */ locations?: string[]; + /** Specifies the resource id of the service endpoint to be used in the cluster. */ + networkIdentifier?: string; } export function serviceEndpointSerializer(item: ServiceEndpoint): any { @@ -3326,6 +3537,7 @@ export function serviceEndpointSerializer(item: ServiceEndpoint): any { : item["locations"].map((p: any) => { return p; }), + networkIdentifier: item["networkIdentifier"], }; } @@ -3337,6 +3549,7 @@ export function serviceEndpointDeserializer(item: any): ServiceEndpoint { : item["locations"].map((p: any) => { return p; }), + networkIdentifier: item["networkIdentifier"], }; } @@ -4190,6 +4403,8 @@ export interface NodeTypeProperties { vmApplications?: VmApplication[]; /** Setting this to true allows stateless node types to scale out without equal distribution across zones. */ zoneBalance?: boolean; + /** Specifies the node type should be configured for only outbound traffic and not inbound traffic. */ + isOutboundOnly?: boolean; } export function nodeTypePropertiesSerializer(item: NodeTypeProperties): any { @@ -4279,6 +4494,7 @@ export function nodeTypePropertiesSerializer(item: NodeTypeProperties): any { ? item["vmApplications"] : vmApplicationArraySerializer(item["vmApplications"]), zoneBalance: item["zoneBalance"], + isOutboundOnly: item["isOutboundOnly"], }; } @@ -4370,6 +4586,7 @@ export function nodeTypePropertiesDeserializer(item: any): NodeTypeProperties { ? item["vmApplications"] : vmApplicationArrayDeserializer(item["vmApplications"]), zoneBalance: item["zoneBalance"], + isOutboundOnly: item["isOutboundOnly"], }; } @@ -5418,7 +5635,10 @@ export type ManagedClusterVersionEnvironment = string; export enum KnownVersions { /** The 2024-11-01-preview API version. */ V20241101Preview = "2024-11-01-preview", + /** 2025-03-01-preview */ V20250301Preview = "2025-03-01-preview", + /** 2025-06-01-preview */ + V20250601Preview = "2025-06-01-preview", } export function managedClusterCodeVersionResultArrayDeserializer( diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts index e87855a66d8d..dac2f28de2ec 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/restorePollerHelpers.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { ServiceFabricManagedClustersManagementClient } from "./serviceFabricManagedClustersManagementClient.js"; +import type { ServiceFabricManagedClustersManagementClient } from "./serviceFabricManagedClustersManagementClient.js"; import { _stopFaultSimulationDeserialize, _startFaultSimulationDeserialize, @@ -31,6 +31,7 @@ import { } from "./api/applicationTypeVersions/operations.js"; import { _$deleteDeserialize as _$deleteDeserializeApplicationTypes } from "./api/applicationTypes/operations.js"; import { + _updateUpgradeDeserialize, _startRollbackDeserialize, _resumeUpgradeDeserialize, _readUpgradeDeserialize, @@ -38,14 +39,10 @@ import { _createOrUpdateDeserialize as _createOrUpdateDeserializeApplications, } from "./api/applications/operations.js"; import { getLongRunningPoller } from "./static-helpers/pollingHelpers.js"; -import { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; -import { - PollerLike, - OperationState, - deserializeState, - ResourceLocationConfig, -} from "@azure/core-lro"; +import type { OperationOptions, PathUncheckedResponse } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; +import type { PollerLike, OperationState, ResourceLocationConfig } from "@azure/core-lro"; +import { deserializeState } from "@azure/core-lro"; export interface RestorePollerOptions< TResult, @@ -105,6 +102,7 @@ export function restorePoller( } interface DeserializationHelper { + // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type deserializer: Function; expectedStatuses: string[]; } @@ -189,6 +187,11 @@ const deserializeMap: Record = { deserializer: _$deleteDeserializeApplicationTypes, expectedStatuses: ["202", "204", "200"], }, + "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/updateUpgrade": + { + deserializer: _updateUpgradeDeserialize, + expectedStatuses: ["202", "200"], + }, "POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback": { deserializer: _startRollbackDeserialize, diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts index 5249d7704cc6..b834f7928325 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/serviceFabricManagedClustersManagementClient.ts @@ -1,64 +1,43 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { - createServiceFabricManagedClustersManagement, +import type { ServiceFabricManagedClustersManagementContext, ServiceFabricManagedClustersManagementClientOptionalParams, } from "./api/index.js"; -import { - OperationStatusOperations, - _getOperationStatusOperations, -} from "./classic/operationStatus/index.js"; -import { - OperationResultsOperations, - _getOperationResultsOperations, -} from "./classic/operationResults/index.js"; -import { - NodeTypeSkusOperations, - _getNodeTypeSkusOperations, -} from "./classic/nodeTypeSkus/index.js"; -import { NodeTypesOperations, _getNodeTypesOperations } from "./classic/nodeTypes/index.js"; -import { - ManagedMaintenanceWindowStatusOperations, - _getManagedMaintenanceWindowStatusOperations, -} from "./classic/managedMaintenanceWindowStatus/index.js"; -import { - ManagedApplyMaintenanceWindowOperations, - _getManagedApplyMaintenanceWindowOperations, -} from "./classic/managedApplyMaintenanceWindow/index.js"; -import { - ManagedAzResiliencyStatusOperations, - _getManagedAzResiliencyStatusOperations, -} from "./classic/managedAzResiliencyStatus/index.js"; -import { - ManagedClustersOperations, - _getManagedClustersOperations, -} from "./classic/managedClusters/index.js"; -import { - ManagedUnsupportedVMSizesOperations, - _getManagedUnsupportedVMSizesOperations, -} from "./classic/managedUnsupportedVMSizes/index.js"; -import { - ManagedClusterVersionOperations, - _getManagedClusterVersionOperations, -} from "./classic/managedClusterVersion/index.js"; -import { ServicesOperations, _getServicesOperations } from "./classic/services/index.js"; -import { - ApplicationTypeVersionsOperations, - _getApplicationTypeVersionsOperations, -} from "./classic/applicationTypeVersions/index.js"; -import { - ApplicationTypesOperations, - _getApplicationTypesOperations, -} from "./classic/applicationTypes/index.js"; -import { - ApplicationsOperations, - _getApplicationsOperations, -} from "./classic/applications/index.js"; -import { OperationsOperations, _getOperationsOperations } from "./classic/operations/index.js"; -import { Pipeline } from "@azure/core-rest-pipeline"; -import { TokenCredential } from "@azure/core-auth"; +import { createServiceFabricManagedClustersManagement } from "./api/index.js"; +import type { ApplicationTypeVersionsOperations } from "./classic/applicationTypeVersions/index.js"; +import { _getApplicationTypeVersionsOperations } from "./classic/applicationTypeVersions/index.js"; +import type { ApplicationTypesOperations } from "./classic/applicationTypes/index.js"; +import { _getApplicationTypesOperations } from "./classic/applicationTypes/index.js"; +import type { ApplicationsOperations } from "./classic/applications/index.js"; +import { _getApplicationsOperations } from "./classic/applications/index.js"; +import type { ManagedApplyMaintenanceWindowOperations } from "./classic/managedApplyMaintenanceWindow/index.js"; +import { _getManagedApplyMaintenanceWindowOperations } from "./classic/managedApplyMaintenanceWindow/index.js"; +import type { ManagedAzResiliencyStatusOperations } from "./classic/managedAzResiliencyStatus/index.js"; +import { _getManagedAzResiliencyStatusOperations } from "./classic/managedAzResiliencyStatus/index.js"; +import type { ManagedClusterVersionOperations } from "./classic/managedClusterVersion/index.js"; +import { _getManagedClusterVersionOperations } from "./classic/managedClusterVersion/index.js"; +import type { ManagedClustersOperations } from "./classic/managedClusters/index.js"; +import { _getManagedClustersOperations } from "./classic/managedClusters/index.js"; +import type { ManagedMaintenanceWindowStatusOperations } from "./classic/managedMaintenanceWindowStatus/index.js"; +import { _getManagedMaintenanceWindowStatusOperations } from "./classic/managedMaintenanceWindowStatus/index.js"; +import type { ManagedUnsupportedVMSizesOperations } from "./classic/managedUnsupportedVMSizes/index.js"; +import { _getManagedUnsupportedVMSizesOperations } from "./classic/managedUnsupportedVMSizes/index.js"; +import type { NodeTypeSkusOperations } from "./classic/nodeTypeSkus/index.js"; +import { _getNodeTypeSkusOperations } from "./classic/nodeTypeSkus/index.js"; +import type { NodeTypesOperations } from "./classic/nodeTypes/index.js"; +import { _getNodeTypesOperations } from "./classic/nodeTypes/index.js"; +import type { OperationResultsOperations } from "./classic/operationResults/index.js"; +import { _getOperationResultsOperations } from "./classic/operationResults/index.js"; +import type { OperationStatusOperations } from "./classic/operationStatus/index.js"; +import { _getOperationStatusOperations } from "./classic/operationStatus/index.js"; +import type { OperationsOperations } from "./classic/operations/index.js"; +import { _getOperationsOperations } from "./classic/operations/index.js"; +import type { ServicesOperations } from "./classic/services/index.js"; +import { _getServicesOperations } from "./classic/services/index.js"; +import type { TokenCredential } from "@azure/core-auth"; +import type { Pipeline } from "@azure/core-rest-pipeline"; export { ServiceFabricManagedClustersManagementClientOptionalParams } from "./api/serviceFabricManagedClustersManagementContext.js"; diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/cloudSettingHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/cloudSettingHelpers.ts new file mode 100644 index 000000000000..613112c6e397 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/cloudSettingHelpers.ts @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +/** + * An enum to describe Azure Cloud environments. + * @enum {string} + */ +export enum AzureClouds { + /** Azure public cloud, which is the default cloud for Azure SDKs. */ + AZURE_PUBLIC_CLOUD = "AZURE_PUBLIC_CLOUD", + /** Azure China cloud */ + AZURE_CHINA_CLOUD = "AZURE_CHINA_CLOUD", + /** Azure US government cloud */ + AZURE_US_GOVERNMENT = "AZURE_US_GOVERNMENT", +} + +/** The supported values for cloud setting as a string literal type */ +export type AzureSupportedClouds = `${AzureClouds}`; + +/** + * Gets the Azure Resource Manager endpoint URL for the specified cloud setting. + * @param cloudSetting - The Azure cloud environment setting. Use one of the AzureClouds enum values. + * @returns The ARM endpoint URL for the specified cloud, or undefined if cloudSetting is undefined. + * @throws {Error} Throws an error if an unknown cloud setting is provided. + */ +export function getArmEndpoint(cloudSetting?: AzureSupportedClouds): string | undefined { + if (cloudSetting === undefined) { + return undefined; + } + const cloudEndpoints: Record = { + AZURE_CHINA_CLOUD: "https://management.chinacloudapi.cn/", + AZURE_US_GOVERNMENT: "https://management.usgovcloudapi.net/", + AZURE_PUBLIC_CLOUD: "https://management.azure.com/", + }; + if (cloudSetting in cloudEndpoints) { + return cloudEndpoints[cloudSetting]; + } else { + throw new Error( + `Unknown cloud setting: ${cloudSetting}. Please refer to the enum AzureClouds for possible values.`, + ); + } +} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts index ce33af5f4178..11248b3804e4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pagingHelpers.ts @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Client, createRestError, PathUncheckedResponse } from "@azure-rest/core-client"; +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; import { RestError } from "@azure/core-rest-pipeline"; /** diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts index f01c41bab69d..63b3c201e5a8 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/pollingHelpers.ts @@ -1,17 +1,18 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { +import type { PollerLike, OperationState, ResourceLocationConfig, RunningOperation, - createHttpPoller, OperationResponse, } from "@azure/core-lro"; +import { createHttpPoller } from "@azure/core-lro"; -import { Client, PathUncheckedResponse, createRestError } from "@azure-rest/core-client"; -import { AbortSignalLike } from "@azure/abort-controller"; +import type { Client, PathUncheckedResponse } from "@azure-rest/core-client"; +import { createRestError } from "@azure-rest/core-client"; +import type { AbortSignalLike } from "@azure/abort-controller"; export interface GetLongRunningPollerOptions { /** Delay to wait until next poll, in milliseconds. */ diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/urlTemplate.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/urlTemplate.ts index 9aac558fb377..657898dd38ff 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/urlTemplate.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/src/static-helpers/urlTemplate.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -//--------------------- +// --------------------- // interfaces -//--------------------- +// --------------------- interface ValueOptions { isFirst: boolean; // is first value in the expression op?: string; // operator @@ -21,27 +21,27 @@ export interface UrlTemplateOptions { // --------------------- // helpers // --------------------- -function encodeComponent(val: string, reserved?: boolean, op?: string) { +function encodeComponent(val: string, reserved?: boolean, op?: string): string { return (reserved ?? op === "+") || op === "#" ? encodeReservedComponent(val) : encodeRFC3986URIComponent(val); } -function encodeReservedComponent(str: string) { +function encodeReservedComponent(str: string): string { return str .split(/(%[0-9A-Fa-f]{2})/g) .map((part) => (!/%[0-9A-Fa-f]/.test(part) ? encodeURI(part) : part)) .join(""); } -function encodeRFC3986URIComponent(str: string) { +function encodeRFC3986URIComponent(str: string): string { return encodeURIComponent(str).replace( /[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, ); } -function isDefined(val: any) { +function isDefined(val: any): boolean { return val !== undefined && val !== null; } @@ -49,7 +49,7 @@ function getNamedAndIfEmpty(op?: string): [boolean, string] { return [!!op && [";", "?", "&"].includes(op), !!op && ["?", "&"].includes(op) ? "=" : ""]; } -function getFirstOrSep(op?: string, isFirst = false) { +function getFirstOrSep(op?: string, isFirst = false): string { if (isFirst) { return !op || op === "+" ? "" : op; } else if (!op || op === "+" || op === "#") { @@ -61,7 +61,7 @@ function getFirstOrSep(op?: string, isFirst = false) { } } -function getExpandedValue(option: ValueOptions) { +function getExpandedValue(option: ValueOptions): string { let isFirst = option.isFirst; const { op, varName, varValue: value, reserved } = option; const vals: string[] = []; @@ -73,7 +73,11 @@ function getExpandedValue(option: ValueOptions) { vals.push(`${getFirstOrSep(op, isFirst)}`); if (named && varName) { vals.push(`${encodeURIComponent(varName)}`); - val === "" ? vals.push(ifEmpty) : vals.push("="); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } } vals.push(encodeComponent(val, reserved, op)); isFirst = false; @@ -88,7 +92,11 @@ function getExpandedValue(option: ValueOptions) { vals.push(`${getFirstOrSep(op, isFirst)}`); if (key) { vals.push(`${encodeURIComponent(key)}`); - named && val === "" ? vals.push(ifEmpty) : vals.push("="); + if (named && val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } } vals.push(encodeComponent(val, reserved, op)); isFirst = false; @@ -97,7 +105,7 @@ function getExpandedValue(option: ValueOptions) { return vals.join(""); } -function getNonExpandedValue(option: ValueOptions) { +function getNonExpandedValue(option: ValueOptions): string | undefined { const { op, varName, varValue: value, isFirst, reserved } = option; const vals: string[] = []; const first = getFirstOrSep(op, isFirst); @@ -143,7 +151,11 @@ function getVarValue(option: ValueOptions): string | undefined { if (named && varName) { // No need to encode varName considering it is already encoded vals.push(varName); - val === "" ? vals.push(ifEmpty) : vals.push("="); + if (val === "") { + vals.push(ifEmpty); + } else { + vals.push("="); + } } if (modifier && modifier !== "*") { val = val.substring(0, parseInt(modifier, 10)); @@ -165,18 +177,19 @@ export function expandUrlTemplate( context: Record, option?: UrlTemplateOptions, ): string { - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, (_, expr, text) => { + return template.replace(/\{([^{}]+)\}|([^{}]+)/g, (_, expr, text) => { if (!expr) { return encodeReservedComponent(text); } let op; if (["+", "#", ".", "/", ";", "?", "&"].includes(expr[0])) { - ((op = expr[0]), (expr = expr.slice(1))); + op = expr[0]; + expr = expr.slice(1); } const varList = expr.split(/,/g); const result = []; for (const varSpec of varList) { - const varMatch = /([^:\*]*)(?::(\d+)|(\*))?/.exec(varSpec); + const varMatch = /([^:*]*)(?::(\d+)|(\*))?/.exec(varSpec); if (!varMatch || !varMatch[1]) { continue; } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/servicefabricmanagedclusters_operations_test.spec.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/servicefabricmanagedclusters_operations_test.spec.ts index 077e2e43510a..cb93d944a8be 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/servicefabricmanagedclusters_operations_test.spec.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/servicefabricmanagedclusters_operations_test.spec.ts @@ -5,7 +5,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { env, Recorder, isPlaybackMode } from "@azure-tools/test-recorder"; +import type { Recorder } from "@azure-tools/test-recorder"; +import { env, isPlaybackMode } from "@azure-tools/test-recorder"; import { createTestCredential } from "@azure-tools/test-credential"; import { assert, beforeEach, afterEach, it, describe } from "vitest"; import { createRecorder } from "./utils/recordedClient.js"; @@ -39,7 +40,7 @@ describe("servicefabricmanagedclusters test", () => { it("operations list test", async function () { const resArray = new Array(); - for await (let item of client.operations.list()) { + for await (const item of client.operations.list()) { resArray.push(item); } assert.notEqual(resArray.length, 0); diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts index 14dcd9fa397c..285e4643c45e 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/test/public/utils/recordedClient.ts @@ -1,7 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -import { Recorder, RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; +import type { RecorderStartOptions, VitestTestContext } from "@azure-tools/test-recorder"; +import { Recorder } from "@azure-tools/test-recorder"; const replaceableVariables: Record = { SUBSCRIPTION_ID: "azure_subscription_id", diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json index d466f1460665..0e57dbd186e5 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.json @@ -12,6 +12,5 @@ { "path": "./tsconfig.snippets.json" } - ], - "files": [] + ] } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json index 42798ad68913..290ca214aebc 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.json @@ -1,14 +1,3 @@ { - "references": [ - { - "path": "./tsconfig.test.node.json" - }, - { - "path": "./tsconfig.browser.config.json" - } - ], - "compilerOptions": { - "composite": true - }, - "files": [] + "extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] } diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.node.json b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.node.json deleted file mode 100644 index 8e974a9783a3..000000000000 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsconfig.test.node.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.test.node.base.json", - "compilerOptions": { - "paths": { - "@azure/arm-servicefabricmanagedclusters": ["./src/index.ts"], - "@azure/arm-servicefabricmanagedclusters/*": ["./src/*"], - "$internal/*": ["./src/*"] - } - } -} diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml index 711a27818d6b..43e4c9ed74c4 100644 --- a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management -commit: 72d218043b48fbf70c67382d7d90e2018cfb37da +directory: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/ServiceFabricManagedClusters +commit: d96524a0f3b22ac5f52f294049464f4287fafd07 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/vitest.esm.config.ts b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/vitest.esm.config.ts new file mode 100644 index 000000000000..5e9735e9b144 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/arm-servicefabricmanagedclusters/vitest.esm.config.ts @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig(vitestConfig, vitestEsmConfig);